@girder/core 3.2.8 → 5.0.0-a10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/dist-lib/Girder_Favicon.png +0 -0
- package/dist-lib/fontello/node_modules/ansi-regex/index.d.ts +37 -0
- package/dist-lib/fontello/node_modules/ansi-styles/index.d.ts +345 -0
- package/dist-lib/fontello/node_modules/big-integer/BigInteger.d.ts +2393 -0
- package/dist-lib/fontello/node_modules/fontello-cli/node_modules/colors/safe.d.ts +48 -0
- package/dist-lib/fontello/node_modules/has-flag/index.d.ts +39 -0
- package/dist-lib/fontello/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/dist-lib/fontello/node_modules/is-docker/index.d.ts +15 -0
- package/dist-lib/fontello/node_modules/is-plain-object/index.d.ts +5 -0
- package/dist-lib/fontello/node_modules/is-wsl/index.d.ts +15 -0
- package/dist-lib/fontello/node_modules/isobject/index.d.ts +5 -0
- package/dist-lib/fontello/node_modules/open/index.d.ts +88 -0
- package/dist-lib/fontello/node_modules/safe-buffer/index.d.ts +187 -0
- package/dist-lib/fontello/node_modules/strip-ansi/index.d.ts +17 -0
- package/dist-lib/girder-core.js +57770 -0
- package/dist-lib/girder-core.js.map +1 -0
- package/dist-lib/girder-core.umd.cjs +1572 -0
- package/dist-lib/girder-core.umd.cjs.map +1 -0
- package/dist-lib/index.d.ts +1 -0
- package/{auth.js → dist-lib/src/auth.js} +1 -41
- package/{collections → dist-lib/src/collections}/AssetstoreCollection.js +2 -1
- package/{constants.js → dist-lib/src/constants.js} +0 -1
- package/dist-lib/src/index.d.ts +23 -0
- package/dist-lib/src/index.ts +80 -0
- package/dist-lib/src/main.ts +46 -0
- package/{models → dist-lib/src/models}/FolderModel.js +1 -1
- package/{rest.js → dist-lib/src/rest.js} +12 -7
- package/{routes.js → dist-lib/src/routes.js} +65 -67
- package/{templates → dist-lib/src/templates}/body/assetstores.pug +0 -15
- package/{templates → dist-lib/src/templates}/body/frontPage.pug +1 -1
- package/{templates → dist-lib/src/templates}/body/systemConfiguration.pug +37 -42
- package/{templates → dist-lib/src/templates}/widgets/editAssetstoreWidget.pug +4 -12
- package/{templates → dist-lib/src/templates}/widgets/newAssetstore.pug +4 -35
- package/dist-lib/src/utilities/EventStream.js +111 -0
- package/{utilities → dist-lib/src/utilities}/S3UploadHandler.js +4 -44
- package/dist-lib/src/version.js +6 -0
- package/{views → dist-lib/src/views}/View.js +2 -1
- package/{views → dist-lib/src/views}/body/AssetstoresView.js +24 -26
- package/{views → dist-lib/src/views}/body/SystemConfigurationView.js +1 -20
- package/{views → dist-lib/src/views}/body/index.js +2 -1
- package/{views → dist-lib/src/views}/layout/LoginView.js +1 -1
- package/{views → dist-lib/src/views}/widgets/ApiKeyListWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/DateTimeRangeWidget.js +2 -1
- package/{views → dist-lib/src/views}/widgets/DateTimeWidget.js +2 -1
- package/{views → dist-lib/src/views}/widgets/EditApiKeyWidget.js +3 -1
- package/{views → dist-lib/src/views}/widgets/EditAssetstoreWidget.js +4 -16
- package/{views → dist-lib/src/views}/widgets/ItemListWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/MetadataWidget.js +7 -3
- package/{views → dist-lib/src/views}/widgets/NewAssetstoreWidget.js +2 -11
- package/{views → dist-lib/src/views}/widgets/PaginateWidget.js +2 -2
- package/{views → dist-lib/src/views}/widgets/RootSelectorWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/SearchPaginateWidget.js +2 -2
- package/{views → dist-lib/src/views}/widgets/SortCollectionWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/index.js +7 -1
- package/dist-lib/src/vite-env.d.ts +5 -0
- package/dist-lib/style.css +16 -0
- package/package.json +80 -31
- package/index.js +0 -31
- package/main.js +0 -21
- package/utilities/EventStream.js +0 -177
- package/version.js +0 -10
- /package/{assets → dist-lib}/Girder_Mark.png +0 -0
- /package/{collections → dist-lib/src/collections}/ApiKeyCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/Collection.js +0 -0
- /package/{collections → dist-lib/src/collections}/CollectionCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/FileCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/FolderCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/GroupCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/ItemCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/UserCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/index.js +0 -0
- /package/{dialog.js → dist-lib/src/dialog.js} +0 -0
- /package/{events.js → dist-lib/src/events.js} +0 -0
- /package/{misc.js → dist-lib/src/misc.js} +0 -0
- /package/{models → dist-lib/src/models}/AccessControlledModel.js +0 -0
- /package/{models → dist-lib/src/models}/ApiKeyModel.js +0 -0
- /package/{models → dist-lib/src/models}/AssetstoreModel.js +0 -0
- /package/{models → dist-lib/src/models}/CollectionCreationPolicyModel.js +0 -0
- /package/{models → dist-lib/src/models}/CollectionModel.js +0 -0
- /package/{models → dist-lib/src/models}/FileModel.js +0 -0
- /package/{models → dist-lib/src/models}/GroupModel.js +0 -0
- /package/{models → dist-lib/src/models}/ItemModel.js +0 -0
- /package/{models → dist-lib/src/models}/MetadataMixin.js +0 -0
- /package/{models → dist-lib/src/models}/Model.js +0 -0
- /package/{models → dist-lib/src/models}/UserModel.js +0 -0
- /package/{models → dist-lib/src/models}/index.js +0 -0
- /package/{pluginUtils.js → dist-lib/src/pluginUtils.js} +0 -0
- /package/{router.js → dist-lib/src/router.js} +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/apidocs/apidocs.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/adminConsole.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/assetstores.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/collectionList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/collectionPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/frontPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/groupList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/groupPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/itemPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/plugins.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/searchResultsList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/systemConfig.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userAccount.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/footer.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/global.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/globalNav.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/header.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/headerUser.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/layout.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/layoutVars.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/loading.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/progressArea.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/accessWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/browserWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/hierarchyWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/markdownWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/metadataWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/searchFieldWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/taskProgress.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/timelineWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/uploadWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/userOtpManagementWidget.styl +0 -0
- /package/{templates → dist-lib/src/templates}/body/adminConsole.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/collectionList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/collectionPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/filesystemImport.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/groupList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/groupPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/itemPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/plugins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/s3Import.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/searchResults.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/searchResultsType.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userAccount.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/alert.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layout.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutFooter.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutGlobalNav.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutHeader.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutHeaderUser.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutProgressArea.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/loginDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/registerDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/resetPasswordDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditor.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditorMixins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditorNonModal.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEntry.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/apiKeyList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/browserWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/checkedActionsMenu.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/collectionInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/confirmDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/dateTimeRangeWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/dateTimeWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editApiKeyWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editCollectionWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editFileWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editFolderWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editGroupWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editItemWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/fileInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/fileList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/folderInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/folderList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupAdminList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupInviteDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupInviteList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupMemberList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupModList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyPaginated.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/itemBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/itemList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/jsonMetadatumEditWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/jsonMetadatumView.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/loadingAnimation.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/markdownWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadataWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadatumEditWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadatumView.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/paginateWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/pluginConfigBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/rootSelectorWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchField.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchHelp.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchModeSelect.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchResults.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/sortCollectionWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/taskProgress.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/timeline.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidgetMixins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidgetNonModal.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpBegin.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpDisable.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpEnable.pug +0 -0
- /package/{utilities → dist-lib/src/utilities}/PluginUtils.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/index.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/jquery/girderEnable.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/jquery/girderModal.js +0 -0
- /package/{views → dist-lib/src/views}/App.js +0 -0
- /package/{views → dist-lib/src/views}/body/AdminView.js +0 -0
- /package/{views → dist-lib/src/views}/body/CollectionView.js +0 -0
- /package/{views → dist-lib/src/views}/body/CollectionsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FilesystemImportView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FolderView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FrontPageView.js +0 -0
- /package/{views → dist-lib/src/views}/body/GroupView.js +0 -0
- /package/{views → dist-lib/src/views}/body/GroupsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/ItemView.js +0 -0
- /package/{views → dist-lib/src/views}/body/PluginsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/S3ImportView.js +0 -0
- /package/{views → dist-lib/src/views}/body/SearchResultsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UserAccountView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UserView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UsersView.js +0 -0
- /package/{views → dist-lib/src/views}/index.js +0 -0
- /package/{views → dist-lib/src/views}/layout/FooterView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/GlobalNavView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/HeaderUserView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/HeaderView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/ProgressListView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/RegisterView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/ResetPasswordView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/index.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/AccessWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/BrowserWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/CheckedMenuWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/CollectionInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditCollectionWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditFileWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditFolderWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditGroupWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditItemWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FileInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FileListWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FolderInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FolderListWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupAdminsWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupInvitesWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupMembersWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupModsWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/HierarchyWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/ItemBreadcrumbWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/LoadingAnimation.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/MarkdownWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/PluginConfigBreadcrumbWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/SearchFieldWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/TaskProgressWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/TimelineWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/UploadWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/UserOtpManagementWidget.js +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Type definitions for Colors.js 1.2
|
|
2
|
+
// Project: https://github.com/Marak/colors.js
|
|
3
|
+
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
|
|
4
|
+
// Definitions: https://github.com/Marak/colors.js
|
|
5
|
+
|
|
6
|
+
export const enabled: boolean;
|
|
7
|
+
export function enable(): void;
|
|
8
|
+
export function disable(): void;
|
|
9
|
+
export function setTheme(theme: any): void;
|
|
10
|
+
|
|
11
|
+
export function strip(str: string): string;
|
|
12
|
+
export function stripColors(str: string): string;
|
|
13
|
+
|
|
14
|
+
export function black(str: string): string;
|
|
15
|
+
export function red(str: string): string;
|
|
16
|
+
export function green(str: string): string;
|
|
17
|
+
export function yellow(str: string): string;
|
|
18
|
+
export function blue(str: string): string;
|
|
19
|
+
export function magenta(str: string): string;
|
|
20
|
+
export function cyan(str: string): string;
|
|
21
|
+
export function white(str: string): string;
|
|
22
|
+
export function gray(str: string): string;
|
|
23
|
+
export function grey(str: string): string;
|
|
24
|
+
|
|
25
|
+
export function bgBlack(str: string): string;
|
|
26
|
+
export function bgRed(str: string): string;
|
|
27
|
+
export function bgGreen(str: string): string;
|
|
28
|
+
export function bgYellow(str: string): string;
|
|
29
|
+
export function bgBlue(str: string): string;
|
|
30
|
+
export function bgMagenta(str: string): string;
|
|
31
|
+
export function bgCyan(str: string): string;
|
|
32
|
+
export function bgWhite(str: string): string;
|
|
33
|
+
|
|
34
|
+
export function reset(str: string): string;
|
|
35
|
+
export function bold(str: string): string;
|
|
36
|
+
export function dim(str: string): string;
|
|
37
|
+
export function italic(str: string): string;
|
|
38
|
+
export function underline(str: string): string;
|
|
39
|
+
export function inverse(str: string): string;
|
|
40
|
+
export function hidden(str: string): string;
|
|
41
|
+
export function strikethrough(str: string): string;
|
|
42
|
+
|
|
43
|
+
export function rainbow(str: string): string;
|
|
44
|
+
export function zebra(str: string): string;
|
|
45
|
+
export function america(str: string): string;
|
|
46
|
+
export function trap(str: string): string;
|
|
47
|
+
export function random(str: string): string;
|
|
48
|
+
export function zalgo(str: string): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
|
|
3
|
+
|
|
4
|
+
@param flag - CLI flag to look for. The `--` prefix is optional.
|
|
5
|
+
@param argv - CLI arguments. Default: `process.argv`.
|
|
6
|
+
@returns Whether the flag exists.
|
|
7
|
+
|
|
8
|
+
@example
|
|
9
|
+
```
|
|
10
|
+
// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
|
|
11
|
+
|
|
12
|
+
// foo.ts
|
|
13
|
+
import hasFlag = require('has-flag');
|
|
14
|
+
|
|
15
|
+
hasFlag('unicorn');
|
|
16
|
+
//=> true
|
|
17
|
+
|
|
18
|
+
hasFlag('--unicorn');
|
|
19
|
+
//=> true
|
|
20
|
+
|
|
21
|
+
hasFlag('f');
|
|
22
|
+
//=> true
|
|
23
|
+
|
|
24
|
+
hasFlag('-f');
|
|
25
|
+
//=> true
|
|
26
|
+
|
|
27
|
+
hasFlag('foo=bar');
|
|
28
|
+
//=> true
|
|
29
|
+
|
|
30
|
+
hasFlag('foo');
|
|
31
|
+
//=> false
|
|
32
|
+
|
|
33
|
+
hasFlag('rainbow');
|
|
34
|
+
//=> false
|
|
35
|
+
```
|
|
36
|
+
*/
|
|
37
|
+
declare function hasFlag(flag: string, argv?: string[]): boolean;
|
|
38
|
+
|
|
39
|
+
export = hasFlag;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* REQUIREMENT: This definition is dependent on the @types/node definition.
|
|
5
|
+
* Install with `npm install @types/node --save-dev`
|
|
6
|
+
*--------------------------------------------------------------------------------------------*/
|
|
7
|
+
|
|
8
|
+
declare module 'iconv-lite' {
|
|
9
|
+
export function decode(buffer: Buffer, encoding: string, options?: Options): string;
|
|
10
|
+
|
|
11
|
+
export function encode(content: string, encoding: string, options?: Options): Buffer;
|
|
12
|
+
|
|
13
|
+
export function encodingExists(encoding: string): boolean;
|
|
14
|
+
|
|
15
|
+
export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
|
|
16
|
+
|
|
17
|
+
export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Options {
|
|
21
|
+
stripBOM?: boolean;
|
|
22
|
+
addBOM?: boolean;
|
|
23
|
+
defaultEncoding?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Check if the process is running inside a Docker container.
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import isDocker = require('is-docker');
|
|
7
|
+
|
|
8
|
+
if (isDocker()) {
|
|
9
|
+
console.log('Running inside a Docker container');
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
*/
|
|
13
|
+
declare function isDocker(): boolean;
|
|
14
|
+
|
|
15
|
+
export = isDocker;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows).
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import isWsl = require('is-wsl');
|
|
7
|
+
|
|
8
|
+
// When running inside Windows Subsystem for Linux
|
|
9
|
+
console.log(isWsl);
|
|
10
|
+
//=> true
|
|
11
|
+
```
|
|
12
|
+
*/
|
|
13
|
+
declare const isWsl: boolean;
|
|
14
|
+
|
|
15
|
+
export = isWsl;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/// <reference types="node"/>
|
|
2
|
+
import {ChildProcess} from 'child_process';
|
|
3
|
+
|
|
4
|
+
declare namespace open {
|
|
5
|
+
interface Options {
|
|
6
|
+
/**
|
|
7
|
+
Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app.
|
|
8
|
+
|
|
9
|
+
Note that it waits for the app to exit, not just for the window to close.
|
|
10
|
+
|
|
11
|
+
On Windows, you have to explicitly specify an app for it to be able to wait.
|
|
12
|
+
|
|
13
|
+
@default false
|
|
14
|
+
*/
|
|
15
|
+
readonly wait?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
__macOS only__
|
|
19
|
+
|
|
20
|
+
Do not bring the app to the foreground.
|
|
21
|
+
|
|
22
|
+
@default false
|
|
23
|
+
*/
|
|
24
|
+
readonly background?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
Specify the app to open the `target` with, or an array with the app and app arguments.
|
|
28
|
+
|
|
29
|
+
The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows.
|
|
30
|
+
|
|
31
|
+
You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome.
|
|
32
|
+
*/
|
|
33
|
+
readonly app?: string | readonly string[];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
__deprecated__
|
|
37
|
+
|
|
38
|
+
This option will be removed in the next major release.
|
|
39
|
+
*/
|
|
40
|
+
readonly url?: boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
Allow the opened app to exit with nonzero exit code when the `wait` option is `true`.
|
|
44
|
+
|
|
45
|
+
We do not recommend setting this option. The convention for success is exit code zero.
|
|
46
|
+
|
|
47
|
+
@default false
|
|
48
|
+
*/
|
|
49
|
+
readonly allowNonzeroExitCode?: boolean;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
Open stuff like URLs, files, executables. Cross-platform.
|
|
55
|
+
|
|
56
|
+
Uses the command `open` on OS X, `start` on Windows and `xdg-open` on other platforms.
|
|
57
|
+
|
|
58
|
+
There is a caveat for [double-quotes on Windows](https://github.com/sindresorhus/open#double-quotes-on-windows) where all double-quotes are stripped from the `target`.
|
|
59
|
+
|
|
60
|
+
@param target - The thing you want to open. Can be a URL, file, or executable. Opens in the default app for the file type. For example, URLs open in your default browser.
|
|
61
|
+
@returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process.
|
|
62
|
+
|
|
63
|
+
@example
|
|
64
|
+
```
|
|
65
|
+
import open = require('open');
|
|
66
|
+
|
|
67
|
+
// Opens the image in the default image viewer
|
|
68
|
+
(async () => {
|
|
69
|
+
await open('unicorn.png', {wait: true});
|
|
70
|
+
console.log('The image viewer app closed');
|
|
71
|
+
|
|
72
|
+
// Opens the url in the default browser
|
|
73
|
+
await open('https://sindresorhus.com');
|
|
74
|
+
|
|
75
|
+
// Specify the app to open in
|
|
76
|
+
await open('https://sindresorhus.com', {app: 'firefox'});
|
|
77
|
+
|
|
78
|
+
// Specify app arguments
|
|
79
|
+
await open('https://sindresorhus.com', {app: ['google chrome', '--incognito']});
|
|
80
|
+
})();
|
|
81
|
+
```
|
|
82
|
+
*/
|
|
83
|
+
declare function open(
|
|
84
|
+
target: string,
|
|
85
|
+
options?: open.Options
|
|
86
|
+
): Promise<ChildProcess>;
|
|
87
|
+
|
|
88
|
+
export = open;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
declare module "safe-buffer" {
|
|
2
|
+
export class Buffer {
|
|
3
|
+
length: number
|
|
4
|
+
write(string: string, offset?: number, length?: number, encoding?: string): number;
|
|
5
|
+
toString(encoding?: string, start?: number, end?: number): string;
|
|
6
|
+
toJSON(): { type: 'Buffer', data: any[] };
|
|
7
|
+
equals(otherBuffer: Buffer): boolean;
|
|
8
|
+
compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
9
|
+
copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
10
|
+
slice(start?: number, end?: number): Buffer;
|
|
11
|
+
writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
12
|
+
writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
13
|
+
writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
14
|
+
writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
|
|
15
|
+
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
16
|
+
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
17
|
+
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
18
|
+
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
|
|
19
|
+
readUInt8(offset: number, noAssert?: boolean): number;
|
|
20
|
+
readUInt16LE(offset: number, noAssert?: boolean): number;
|
|
21
|
+
readUInt16BE(offset: number, noAssert?: boolean): number;
|
|
22
|
+
readUInt32LE(offset: number, noAssert?: boolean): number;
|
|
23
|
+
readUInt32BE(offset: number, noAssert?: boolean): number;
|
|
24
|
+
readInt8(offset: number, noAssert?: boolean): number;
|
|
25
|
+
readInt16LE(offset: number, noAssert?: boolean): number;
|
|
26
|
+
readInt16BE(offset: number, noAssert?: boolean): number;
|
|
27
|
+
readInt32LE(offset: number, noAssert?: boolean): number;
|
|
28
|
+
readInt32BE(offset: number, noAssert?: boolean): number;
|
|
29
|
+
readFloatLE(offset: number, noAssert?: boolean): number;
|
|
30
|
+
readFloatBE(offset: number, noAssert?: boolean): number;
|
|
31
|
+
readDoubleLE(offset: number, noAssert?: boolean): number;
|
|
32
|
+
readDoubleBE(offset: number, noAssert?: boolean): number;
|
|
33
|
+
swap16(): Buffer;
|
|
34
|
+
swap32(): Buffer;
|
|
35
|
+
swap64(): Buffer;
|
|
36
|
+
writeUInt8(value: number, offset: number, noAssert?: boolean): number;
|
|
37
|
+
writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
|
38
|
+
writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
|
39
|
+
writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
|
40
|
+
writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
|
41
|
+
writeInt8(value: number, offset: number, noAssert?: boolean): number;
|
|
42
|
+
writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
|
|
43
|
+
writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
|
|
44
|
+
writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
|
|
45
|
+
writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
|
|
46
|
+
writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
|
|
47
|
+
writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
|
|
48
|
+
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
|
|
49
|
+
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
|
|
50
|
+
fill(value: any, offset?: number, end?: number): this;
|
|
51
|
+
indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
|
|
52
|
+
lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
|
|
53
|
+
includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Allocates a new buffer containing the given {str}.
|
|
57
|
+
*
|
|
58
|
+
* @param str String to store in buffer.
|
|
59
|
+
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
60
|
+
*/
|
|
61
|
+
constructor (str: string, encoding?: string);
|
|
62
|
+
/**
|
|
63
|
+
* Allocates a new buffer of {size} octets.
|
|
64
|
+
*
|
|
65
|
+
* @param size count of octets to allocate.
|
|
66
|
+
*/
|
|
67
|
+
constructor (size: number);
|
|
68
|
+
/**
|
|
69
|
+
* Allocates a new buffer containing the given {array} of octets.
|
|
70
|
+
*
|
|
71
|
+
* @param array The octets to store.
|
|
72
|
+
*/
|
|
73
|
+
constructor (array: Uint8Array);
|
|
74
|
+
/**
|
|
75
|
+
* Produces a Buffer backed by the same allocated memory as
|
|
76
|
+
* the given {ArrayBuffer}.
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
80
|
+
*/
|
|
81
|
+
constructor (arrayBuffer: ArrayBuffer);
|
|
82
|
+
/**
|
|
83
|
+
* Allocates a new buffer containing the given {array} of octets.
|
|
84
|
+
*
|
|
85
|
+
* @param array The octets to store.
|
|
86
|
+
*/
|
|
87
|
+
constructor (array: any[]);
|
|
88
|
+
/**
|
|
89
|
+
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
90
|
+
*
|
|
91
|
+
* @param buffer The buffer to copy.
|
|
92
|
+
*/
|
|
93
|
+
constructor (buffer: Buffer);
|
|
94
|
+
prototype: Buffer;
|
|
95
|
+
/**
|
|
96
|
+
* Allocates a new Buffer using an {array} of octets.
|
|
97
|
+
*
|
|
98
|
+
* @param array
|
|
99
|
+
*/
|
|
100
|
+
static from(array: any[]): Buffer;
|
|
101
|
+
/**
|
|
102
|
+
* When passed a reference to the .buffer property of a TypedArray instance,
|
|
103
|
+
* the newly created Buffer will share the same allocated memory as the TypedArray.
|
|
104
|
+
* The optional {byteOffset} and {length} arguments specify a memory range
|
|
105
|
+
* within the {arrayBuffer} that will be shared by the Buffer.
|
|
106
|
+
*
|
|
107
|
+
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
|
|
108
|
+
* @param byteOffset
|
|
109
|
+
* @param length
|
|
110
|
+
*/
|
|
111
|
+
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
112
|
+
/**
|
|
113
|
+
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
114
|
+
*
|
|
115
|
+
* @param buffer
|
|
116
|
+
*/
|
|
117
|
+
static from(buffer: Buffer): Buffer;
|
|
118
|
+
/**
|
|
119
|
+
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
120
|
+
* If provided, the {encoding} parameter identifies the character encoding.
|
|
121
|
+
* If not provided, {encoding} defaults to 'utf8'.
|
|
122
|
+
*
|
|
123
|
+
* @param str
|
|
124
|
+
*/
|
|
125
|
+
static from(str: string, encoding?: string): Buffer;
|
|
126
|
+
/**
|
|
127
|
+
* Returns true if {obj} is a Buffer
|
|
128
|
+
*
|
|
129
|
+
* @param obj object to test.
|
|
130
|
+
*/
|
|
131
|
+
static isBuffer(obj: any): obj is Buffer;
|
|
132
|
+
/**
|
|
133
|
+
* Returns true if {encoding} is a valid encoding argument.
|
|
134
|
+
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
135
|
+
*
|
|
136
|
+
* @param encoding string to test.
|
|
137
|
+
*/
|
|
138
|
+
static isEncoding(encoding: string): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
|
|
141
|
+
* This is not the same as String.prototype.length since that returns the number of characters in a string.
|
|
142
|
+
*
|
|
143
|
+
* @param string string to test.
|
|
144
|
+
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
|
145
|
+
*/
|
|
146
|
+
static byteLength(string: string, encoding?: string): number;
|
|
147
|
+
/**
|
|
148
|
+
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
149
|
+
*
|
|
150
|
+
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
|
|
151
|
+
* If the list has exactly one item, then the first item of the list is returned.
|
|
152
|
+
* If the list has more than one item, then a new Buffer is created.
|
|
153
|
+
*
|
|
154
|
+
* @param list An array of Buffer objects to concatenate
|
|
155
|
+
* @param totalLength Total length of the buffers when concatenated.
|
|
156
|
+
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
157
|
+
*/
|
|
158
|
+
static concat(list: Buffer[], totalLength?: number): Buffer;
|
|
159
|
+
/**
|
|
160
|
+
* The same as buf1.compare(buf2).
|
|
161
|
+
*/
|
|
162
|
+
static compare(buf1: Buffer, buf2: Buffer): number;
|
|
163
|
+
/**
|
|
164
|
+
* Allocates a new buffer of {size} octets.
|
|
165
|
+
*
|
|
166
|
+
* @param size count of octets to allocate.
|
|
167
|
+
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
|
|
168
|
+
* If parameter is omitted, buffer will be filled with zeros.
|
|
169
|
+
* @param encoding encoding used for call to buf.fill while initalizing
|
|
170
|
+
*/
|
|
171
|
+
static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
|
|
172
|
+
/**
|
|
173
|
+
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
174
|
+
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
175
|
+
*
|
|
176
|
+
* @param size count of octets to allocate
|
|
177
|
+
*/
|
|
178
|
+
static allocUnsafe(size: number): Buffer;
|
|
179
|
+
/**
|
|
180
|
+
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
|
|
181
|
+
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
182
|
+
*
|
|
183
|
+
* @param size count of octets to allocate
|
|
184
|
+
*/
|
|
185
|
+
static allocUnsafeSlow(size: number): Buffer;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import stripAnsi = require('strip-ansi');
|
|
7
|
+
|
|
8
|
+
stripAnsi('\u001B[4mUnicorn\u001B[0m');
|
|
9
|
+
//=> 'Unicorn'
|
|
10
|
+
|
|
11
|
+
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
|
12
|
+
//=> 'Click'
|
|
13
|
+
```
|
|
14
|
+
*/
|
|
15
|
+
declare function stripAnsi(string: string): string;
|
|
16
|
+
|
|
17
|
+
export = stripAnsi;
|