Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
67499b50
Unverified
Commit
67499b50
authored
Oct 25, 2021
by
Sigurd Meldgaard
Committed by
GitHub
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new pub command 'Token' (#91014)
parent
95baca94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
packages.dart
packages/flutter_tools/lib/src/commands/packages.dart
+1
-0
packages_test.dart
...er_tools/test/commands.shard/permeable/packages_test.dart
+28
-0
No files found.
packages/flutter_tools/lib/src/commands/packages.dart
View file @
67499b50
...
...
@@ -38,6 +38,7 @@ class PackagesCommand extends FlutterCommand {
addSubcommand
(
PackagesForwardCommand
(
'logout'
,
'Log out of pub.dev.'
));
addSubcommand
(
PackagesForwardCommand
(
'global'
,
'Work with Pub global packages'
));
addSubcommand
(
PackagesForwardCommand
(
'outdated'
,
'Analyze dependencies to find which ones can be upgraded'
,
requiresPubspec:
true
));
addSubcommand
(
PackagesForwardCommand
(
'token'
,
'Manage authentication tokens for hosted pub repositories.'
));
addSubcommand
(
PackagesPassthroughCommand
());
}
...
...
packages/flutter_tools/test/commands.shard/permeable/packages_test.dart
View file @
67499b50
...
...
@@ -525,6 +525,34 @@ void main() {
),
});
testUsingContext
(
'token pass arguments through to pub'
,
()
async
{
Cache
.
flutterRoot
=
''
;
globals
.
fs
.
file
(
'pubspec.yaml'
).
createSync
();
final
IOSink
stdin
=
IOSink
(
StreamController
<
List
<
int
>>().
sink
);
processManager
.
addCommand
(
FakeCommand
(
command:
const
<
String
>[
'/bin/cache/dart-sdk/bin/dart'
,
'__deprecated_pub'
,
'token'
,
'list'
],
stdin:
stdin
,
),
);
await
createTestCommandRunner
(
PackagesCommand
()).
run
(<
String
>[
'packages'
,
'--verbose'
,
'pub'
,
'token'
,
'list'
]);
expect
(
processManager
,
hasNoRemainingExpectations
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
Platform:
()
=>
FakePlatform
(
environment:
<
String
,
String
>{}),
ProcessManager:
()
=>
processManager
,
Stdio:
()
=>
mockStdio
,
Pub:
()
=>
Pub
(
fileSystem:
globals
.
fs
,
logger:
globals
.
logger
,
processManager:
globals
.
processManager
,
usage:
globals
.
flutterUsage
,
botDetector:
globals
.
botDetector
,
platform:
globals
.
platform
,
),
});
testUsingContext
(
'upgrade does not check for pubspec.yaml if -h/--help is passed'
,
()
async
{
Cache
.
flutterRoot
=
''
;
processManager
.
addCommand
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment