@backstage/cli 0.36.0-next.1 → 0.36.0
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/CHANGELOG.md +110 -0
- package/config/eslint-factory.js +1 -0
- package/config/getJestEnvironment.js +7 -29
- package/config/jest-environment-jsdom/index.js +9 -43
- package/config/jest.js +7 -401
- package/config/jestCacheResultProcessor.cjs +10 -6
- package/config/jestCachingModuleLoader.js +11 -19
- package/config/jestFileTransform.js +11 -28
- package/config/jestRejectNetworkRequests.js +10 -53
- package/config/jestSucraseTransform.js +10 -70
- package/config/jestSwcTransform.js +10 -27
- package/config/jestYamlTransform.js +11 -24
- package/config/nodeTransform.cjs +10 -70
- package/config/nodeTransformHooks.mjs +4 -278
- package/config/webpack-public-path.js +10 -14
- package/dist/cli-internal/src/InternalCliModule.cjs.js +11 -0
- package/dist/cli-internal/src/InternalCommandNode.cjs.js +25 -0
- package/dist/cli-internal/src/knownPluginPackages.cjs.js +40 -0
- package/dist/index.cjs.js +21 -10
- package/dist/wiring/CliInitializer.cjs.js +61 -20
- package/dist/wiring/CommandGraph.cjs.js +81 -23
- package/dist/wiring/discoverCliModules.cjs.js +44 -0
- package/package.json +27 -154
- package/dist/modules/build/commands/buildWorkspace.cjs.js +0 -24
- package/dist/modules/build/commands/package/build/command.cjs.js +0 -89
- package/dist/modules/build/commands/package/build/index.cjs.js +0 -8
- package/dist/modules/build/commands/package/clean.cjs.js +0 -21
- package/dist/modules/build/commands/package/postpack.cjs.js +0 -15
- package/dist/modules/build/commands/package/prepack.cjs.js +0 -29
- package/dist/modules/build/commands/package/start/command.cjs.js +0 -23
- package/dist/modules/build/commands/package/start/index.cjs.js +0 -8
- package/dist/modules/build/commands/package/start/resolveLinkedWorkspace.cjs.js +0 -34
- package/dist/modules/build/commands/package/start/startBackend.cjs.js +0 -46
- package/dist/modules/build/commands/package/start/startFrontend.cjs.js +0 -50
- package/dist/modules/build/commands/package/start/startPackage.cjs.js +0 -53
- package/dist/modules/build/commands/repo/build.cjs.js +0 -114
- package/dist/modules/build/commands/repo/clean.cjs.js +0 -41
- package/dist/modules/build/commands/repo/start.cjs.js +0 -150
- package/dist/modules/build/index.cjs.js +0 -192
- package/dist/modules/build/lib/buildBackend.cjs.js +0 -81
- package/dist/modules/build/lib/buildFrontend.cjs.js +0 -50
- package/dist/modules/build/lib/builder/config.cjs.js +0 -257
- package/dist/modules/build/lib/builder/packager.cjs.js +0 -131
- package/dist/modules/build/lib/builder/plugins.cjs.js +0 -125
- package/dist/modules/build/lib/builder/types.cjs.js +0 -10
- package/dist/modules/build/lib/bundler/ConfigInjectingHtmlWebpackPlugin.cjs.js +0 -43
- package/dist/modules/build/lib/bundler/bundle.cjs.js +0 -189
- package/dist/modules/build/lib/bundler/config.cjs.js +0 -308
- package/dist/modules/build/lib/bundler/hasReactDomClient.cjs.js +0 -17
- package/dist/modules/build/lib/bundler/linkWorkspaces.cjs.js +0 -34
- package/dist/modules/build/lib/bundler/moduleFederation.cjs.js +0 -135
- package/dist/modules/build/lib/bundler/optimization.cjs.js +0 -68
- package/dist/modules/build/lib/bundler/packageDetection.cjs.js +0 -124
- package/dist/modules/build/lib/bundler/paths.cjs.js +0 -62
- package/dist/modules/build/lib/bundler/server.cjs.js +0 -231
- package/dist/modules/build/lib/bundler/transforms.cjs.js +0 -145
- package/dist/modules/build/lib/config.cjs.js +0 -94
- package/dist/modules/build/lib/entryPoints.cjs.js +0 -49
- package/dist/modules/build/lib/ipc/IpcServer.cjs.js +0 -60
- package/dist/modules/build/lib/ipc/ServerDataStore.cjs.js +0 -36
- package/dist/modules/build/lib/optionsParser.cjs.js +0 -37
- package/dist/modules/build/lib/packager/createDistWorkspace.cjs.js +0 -235
- package/dist/modules/build/lib/packager/productionPack.cjs.js +0 -160
- package/dist/modules/build/lib/publishing.cjs.js +0 -40
- package/dist/modules/build/lib/role.cjs.js +0 -24
- package/dist/modules/build/lib/runner/runBackend.cjs.js +0 -136
- package/dist/modules/build/lib/typeDistProject.cjs.js +0 -89
- package/dist/modules/build/lib/urls.cjs.js +0 -13
- package/dist/modules/config/commands/docs.cjs.js +0 -62
- package/dist/modules/config/commands/print.cjs.js +0 -80
- package/dist/modules/config/commands/schema.cjs.js +0 -55
- package/dist/modules/config/commands/validate.cjs.js +0 -49
- package/dist/modules/config/index.cjs.js +0 -51
- package/dist/modules/config/lib/config.cjs.js +0 -94
- package/dist/modules/create-github-app/commands/create-github-app/GithubCreateAppServer.cjs.js +0 -127
- package/dist/modules/create-github-app/commands/create-github-app/index.cjs.js +0 -115
- package/dist/modules/create-github-app/index.cjs.js +0 -27
- package/dist/modules/info/commands/info.cjs.js +0 -181
- package/dist/modules/info/index.cjs.js +0 -19
- package/dist/modules/lint/commands/package/lint.cjs.js +0 -46
- package/dist/modules/lint/commands/repo/lint.cjs.js +0 -212
- package/dist/modules/lint/index.cjs.js +0 -82
- package/dist/modules/lint/lib/optionsParser.cjs.js +0 -37
- package/dist/modules/maintenance/commands/repo/fix.cjs.js +0 -400
- package/dist/modules/maintenance/commands/repo/list-deprecations.cjs.js +0 -74
- package/dist/modules/maintenance/index.cjs.js +0 -42
- package/dist/modules/migrate/commands/packageExports.cjs.js +0 -15
- package/dist/modules/migrate/commands/packageLintConfigs.cjs.js +0 -77
- package/dist/modules/migrate/commands/packageRole.cjs.js +0 -57
- package/dist/modules/migrate/commands/packageScripts.cjs.js +0 -87
- package/dist/modules/migrate/commands/reactRouterDeps.cjs.js +0 -51
- package/dist/modules/migrate/commands/versions/bump.cjs.js +0 -373
- package/dist/modules/migrate/commands/versions/migrate.cjs.js +0 -112
- package/dist/modules/migrate/index.cjs.js +0 -82
- package/dist/modules/migrate/lib/utils.cjs.js +0 -44
- package/dist/modules/migrate/lib/versioning/packages.cjs.js +0 -71
- package/dist/modules/migrate/lib/versioning/yarn.cjs.js +0 -28
- package/dist/modules/new/commands/new.cjs.js +0 -60
- package/dist/modules/new/index.cjs.js +0 -68
- package/dist/modules/new/lib/codeowners/codeowners.cjs.js +0 -92
- package/dist/modules/new/lib/createNewPackage.cjs.js +0 -32
- package/dist/modules/new/lib/defaultTemplates.cjs.js +0 -17
- package/dist/modules/new/lib/execution/PortableTemplater.cjs.js +0 -89
- package/dist/modules/new/lib/execution/executePortableTemplate.cjs.js +0 -66
- package/dist/modules/new/lib/execution/installNewPackage.cjs.js +0 -127
- package/dist/modules/new/lib/execution/writeTemplateContents.cjs.js +0 -116
- package/dist/modules/new/lib/preparation/collectPortableTemplateInput.cjs.js +0 -157
- package/dist/modules/new/lib/preparation/loadPortableTemplate.cjs.js +0 -81
- package/dist/modules/new/lib/preparation/loadPortableTemplateConfig.cjs.js +0 -132
- package/dist/modules/new/lib/preparation/resolvePackageParams.cjs.js +0 -40
- package/dist/modules/new/lib/preparation/selectTemplateInteractively.cjs.js +0 -38
- package/dist/modules/new/lib/tasks.cjs.js +0 -51
- package/dist/modules/new/lib/types.cjs.js +0 -19
- package/dist/modules/new/lib/version.cjs.js +0 -91
- package/dist/modules/test/commands/package/test.cjs.js +0 -65
- package/dist/modules/test/commands/repo/test.cjs.js +0 -288
- package/dist/modules/test/index.cjs.js +0 -54
- package/dist/modules/translations/commands/export.cjs.js +0 -127
- package/dist/modules/translations/commands/import.cjs.js +0 -164
- package/dist/modules/translations/index.cjs.js +0 -24
- package/dist/modules/translations/lib/discoverPackages.cjs.js +0 -121
- package/dist/modules/translations/lib/extractTranslations.cjs.js +0 -71
- package/dist/modules/translations/lib/messageFilePath.cjs.js +0 -43
- package/dist/packages/backend-defaults/package.json.cjs.js +0 -6
- package/dist/packages/backend-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/backend-test-utils/package.json.cjs.js +0 -6
- package/dist/packages/catalog-client/package.json.cjs.js +0 -6
- package/dist/packages/cli/package.json.cjs.js +0 -156
- package/dist/packages/config/package.json.cjs.js +0 -6
- package/dist/packages/core-app-api/package.json.cjs.js +0 -6
- package/dist/packages/core-components/package.json.cjs.js +0 -6
- package/dist/packages/core-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/dev-utils/package.json.cjs.js +0 -6
- package/dist/packages/errors/package.json.cjs.js +0 -6
- package/dist/packages/frontend-defaults/package.json.cjs.js +0 -6
- package/dist/packages/frontend-plugin-api/package.json.cjs.js +0 -6
- package/dist/packages/frontend-plugin-api/src/routing/describeParentCallSite.cjs.js +0 -26
- package/dist/packages/frontend-test-utils/package.json.cjs.js +0 -6
- package/dist/packages/test-utils/package.json.cjs.js +0 -6
- package/dist/packages/theme/package.json.cjs.js +0 -6
- package/dist/packages/types/package.json.cjs.js +0 -6
- package/dist/plugins/auth-backend/package.json.cjs.js +0 -6
- package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +0 -6
- package/dist/plugins/catalog-node/package.json.cjs.js +0 -6
- package/dist/plugins/scaffolder-node/package.json.cjs.js +0 -6
- package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +0 -6
- package/dist/wiring/CommandRegistry.cjs.js +0 -14
- package/dist/wiring/factory.cjs.js +0 -15
- package/dist/wiring/lazy.cjs.js +0 -22
- package/dist/wiring/types.cjs.js +0 -11
- package/templates/backend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/backend-plugin/README.md.hbs +0 -28
- package/templates/backend-plugin/dev/index.ts.hbs +0 -60
- package/templates/backend-plugin/package.json.hbs +0 -44
- package/templates/backend-plugin/portable-template.yaml +0 -5
- package/templates/backend-plugin/src/index.ts.hbs +0 -1
- package/templates/backend-plugin/src/plugin.test.ts.hbs +0 -129
- package/templates/backend-plugin/src/plugin.ts.hbs +0 -32
- package/templates/backend-plugin/src/router.test.ts +0 -67
- package/templates/backend-plugin/src/router.ts +0 -51
- package/templates/backend-plugin/src/services/TodoListService.ts +0 -155
- package/templates/backend-plugin/src/setupTests.ts +0 -1
- package/templates/backend-plugin-module/.eslintrc.js.hbs +0 -1
- package/templates/backend-plugin-module/README.md.hbs +0 -5
- package/templates/backend-plugin-module/package.json.hbs +0 -34
- package/templates/backend-plugin-module/portable-template.yaml +0 -5
- package/templates/backend-plugin-module/src/index.ts.hbs +0 -8
- package/templates/backend-plugin-module/src/module.ts.hbs +0 -17
- package/templates/catalog-provider-module/.eslintrc.js.hbs +0 -1
- package/templates/catalog-provider-module/README.md.hbs +0 -5
- package/templates/catalog-provider-module/config.d.ts.hbs +0 -34
- package/templates/catalog-provider-module/package.json.hbs +0 -36
- package/templates/catalog-provider-module/portable-template.yaml +0 -9
- package/templates/catalog-provider-module/src/index.ts.hbs +0 -8
- package/templates/catalog-provider-module/src/module.ts.hbs +0 -29
- package/templates/catalog-provider-module/src/provider/readProviderConfigs.ts.hbs +0 -78
- package/templates/catalog-provider-module/src/provider/{{providerClass}}.test.ts.hbs +0 -18
- package/templates/catalog-provider-module/src/provider/{{providerClass}}.ts.hbs +0 -109
- package/templates/frontend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/frontend-plugin/README.md.hbs +0 -13
- package/templates/frontend-plugin/dev/index.tsx.hbs +0 -11
- package/templates/frontend-plugin/package.json.hbs +0 -54
- package/templates/frontend-plugin/portable-template.yaml +0 -6
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -28
- package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -37
- package/templates/frontend-plugin/src/components/ExampleComponent/index.ts +0 -1
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -19
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -308
- package/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts +0 -1
- package/templates/frontend-plugin/src/index.ts.hbs +0 -1
- package/templates/frontend-plugin/src/plugin.test.ts.hbs +0 -7
- package/templates/frontend-plugin/src/plugin.ts.hbs +0 -22
- package/templates/frontend-plugin/src/routes.ts.hbs +0 -5
- package/templates/frontend-plugin/src/setupTests.ts +0 -1
- package/templates/new-frontend-plugin/.eslintrc.js.hbs +0 -1
- package/templates/new-frontend-plugin/README.md.hbs +0 -20
- package/templates/new-frontend-plugin/dev/index.tsx +0 -10
- package/templates/new-frontend-plugin/package.json.hbs +0 -49
- package/templates/new-frontend-plugin/portable-template.yaml +0 -5
- package/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -28
- package/templates/new-frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -37
- package/templates/new-frontend-plugin/src/components/ExampleComponent/index.ts +0 -1
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -19
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -308
- package/templates/new-frontend-plugin/src/components/ExampleFetchComponent/index.ts +0 -1
- package/templates/new-frontend-plugin/src/index.ts.hbs +0 -1
- package/templates/new-frontend-plugin/src/plugin.test.ts.hbs +0 -7
- package/templates/new-frontend-plugin/src/plugin.tsx.hbs +0 -25
- package/templates/new-frontend-plugin/src/routes.ts +0 -3
- package/templates/new-frontend-plugin/src/setupTests.ts +0 -1
- package/templates/new-frontend-plugin-module/.eslintrc.js.hbs +0 -1
- package/templates/new-frontend-plugin-module/README.md.hbs +0 -5
- package/templates/new-frontend-plugin-module/package.json.hbs +0 -35
- package/templates/new-frontend-plugin-module/portable-template.yaml +0 -5
- package/templates/new-frontend-plugin-module/src/index.ts.hbs +0 -1
- package/templates/new-frontend-plugin-module/src/module.tsx.hbs +0 -8
- package/templates/new-frontend-plugin-module/src/setupTests.ts +0 -1
- package/templates/node-library/.eslintrc.js.hbs +0 -1
- package/templates/node-library/README.md.hbs +0 -12
- package/templates/node-library/package.json.hbs +0 -29
- package/templates/node-library/portable-template.yaml +0 -3
- package/templates/node-library/src/index.ts.hbs +0 -1
- package/templates/node-library/src/setupTests.ts +0 -1
- package/templates/plugin-common-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-common-library/README.md.hbs +0 -5
- package/templates/plugin-common-library/package.json.hbs +0 -31
- package/templates/plugin-common-library/portable-template.yaml +0 -3
- package/templates/plugin-common-library/src/index.ts.hbs +0 -19
- package/templates/plugin-common-library/src/setupTests.ts +0 -1
- package/templates/plugin-node-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-node-library/README.md.hbs +0 -5
- package/templates/plugin-node-library/package.json.hbs +0 -30
- package/templates/plugin-node-library/portable-template.yaml +0 -3
- package/templates/plugin-node-library/src/index.ts.hbs +0 -18
- package/templates/plugin-node-library/src/setupTests.ts +0 -1
- package/templates/plugin-web-library/.eslintrc.js.hbs +0 -1
- package/templates/plugin-web-library/README.md.hbs +0 -5
- package/templates/plugin-web-library/package.json.hbs +0 -42
- package/templates/plugin-web-library/portable-template.yaml +0 -3
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.test.tsx +0 -17
- package/templates/plugin-web-library/src/components/ExampleComponent/ExampleComponent.tsx +0 -28
- package/templates/plugin-web-library/src/components/ExampleComponent/index.ts +0 -2
- package/templates/plugin-web-library/src/components/index.ts +0 -5
- package/templates/plugin-web-library/src/hooks/index.ts +0 -5
- package/templates/plugin-web-library/src/hooks/useExample/index.ts +0 -1
- package/templates/plugin-web-library/src/hooks/useExample/useExample.ts +0 -15
- package/templates/plugin-web-library/src/index.ts.hbs +0 -12
- package/templates/plugin-web-library/src/setupTests.ts +0 -1
- package/templates/scaffolder-backend-module/.eslintrc.js.hbs +0 -1
- package/templates/scaffolder-backend-module/README.md.hbs +0 -5
- package/templates/scaffolder-backend-module/package.json.hbs +0 -36
- package/templates/scaffolder-backend-module/portable-template.yaml +0 -6
- package/templates/scaffolder-backend-module/src/actions/example.test.ts +0 -24
- package/templates/scaffolder-backend-module/src/actions/example.ts +0 -39
- package/templates/scaffolder-backend-module/src/index.ts.hbs +0 -8
- package/templates/scaffolder-backend-module/src/module.ts +0 -21
- package/templates/web-library/.eslintrc.js.hbs +0 -1
- package/templates/web-library/README.md.hbs +0 -12
- package/templates/web-library/package.json.hbs +0 -30
- package/templates/web-library/portable-template.yaml +0 -3
- package/templates/web-library/src/index.ts.hbs +0 -1
- package/templates/web-library/src/setupTests.ts +0 -1
- /package/dist/{packages/opaque-internal → opaque-internal}/src/OpaqueType.cjs.js +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var version = "0.36.0-next.1";
|
|
4
|
-
var dependencies = {
|
|
5
|
-
"@backstage/catalog-model": "workspace:^",
|
|
6
|
-
"@backstage/cli-common": "workspace:^",
|
|
7
|
-
"@backstage/cli-node": "workspace:^",
|
|
8
|
-
"@backstage/config": "workspace:^",
|
|
9
|
-
"@backstage/config-loader": "workspace:^",
|
|
10
|
-
"@backstage/errors": "workspace:^",
|
|
11
|
-
"@backstage/eslint-plugin": "workspace:^",
|
|
12
|
-
"@backstage/integration": "workspace:^",
|
|
13
|
-
"@backstage/module-federation-common": "workspace:^",
|
|
14
|
-
"@backstage/release-manifests": "workspace:^",
|
|
15
|
-
"@backstage/types": "workspace:^",
|
|
16
|
-
"@manypkg/get-packages": "^1.1.3",
|
|
17
|
-
"@module-federation/enhanced": "^0.21.6",
|
|
18
|
-
"@octokit/request": "^8.0.0",
|
|
19
|
-
"@rollup/plugin-commonjs": "^26.0.0",
|
|
20
|
-
"@rollup/plugin-json": "^6.0.0",
|
|
21
|
-
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
22
|
-
"@rollup/plugin-yaml": "^4.0.0",
|
|
23
|
-
"@rspack/core": "^1.4.11",
|
|
24
|
-
"@rspack/dev-server": "^1.1.4",
|
|
25
|
-
"@rspack/plugin-react-refresh": "^1.4.3",
|
|
26
|
-
"@spotify/eslint-config-base": "^15.0.0",
|
|
27
|
-
"@spotify/eslint-config-react": "^15.0.0",
|
|
28
|
-
"@spotify/eslint-config-typescript": "^15.0.0",
|
|
29
|
-
"@swc/core": "^1.15.6",
|
|
30
|
-
"@swc/helpers": "^0.5.17",
|
|
31
|
-
"@swc/jest": "^0.2.39",
|
|
32
|
-
"@types/webpack-env": "^1.15.2",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
|
34
|
-
"@typescript-eslint/parser": "^8.16.0",
|
|
35
|
-
bfj: "^9.0.2",
|
|
36
|
-
buffer: "^6.0.3",
|
|
37
|
-
chalk: "^4.0.0",
|
|
38
|
-
chokidar: "^3.3.1",
|
|
39
|
-
cleye: "^2.2.1",
|
|
40
|
-
commander: "^14.0.3",
|
|
41
|
-
"cross-fetch": "^4.0.0",
|
|
42
|
-
"cross-spawn": "^7.0.3",
|
|
43
|
-
"css-loader": "^6.5.1",
|
|
44
|
-
"ctrlc-windows": "^2.1.0",
|
|
45
|
-
esbuild: "^0.27.0",
|
|
46
|
-
eslint: "^8.6.0",
|
|
47
|
-
"eslint-config-prettier": "^9.0.0",
|
|
48
|
-
"eslint-formatter-friendly": "^7.0.0",
|
|
49
|
-
"eslint-plugin-deprecation": "^3.0.0",
|
|
50
|
-
"eslint-plugin-import": "^2.31.0",
|
|
51
|
-
"eslint-plugin-jest": "^28.9.0",
|
|
52
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
53
|
-
"eslint-plugin-react": "^7.37.2",
|
|
54
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
55
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
56
|
-
"eslint-rspack-plugin": "^4.2.1",
|
|
57
|
-
express: "^4.22.0",
|
|
58
|
-
"fs-extra": "^11.2.0",
|
|
59
|
-
"git-url-parse": "^15.0.0",
|
|
60
|
-
glob: "^7.1.7",
|
|
61
|
-
"global-agent": "^3.0.0",
|
|
62
|
-
globby: "^11.1.0",
|
|
63
|
-
handlebars: "^4.7.3",
|
|
64
|
-
"html-webpack-plugin": "^5.6.3",
|
|
65
|
-
inquirer: "^8.2.0",
|
|
66
|
-
"jest-css-modules": "^2.1.0",
|
|
67
|
-
"json-schema": "^0.4.0",
|
|
68
|
-
lodash: "^4.17.21",
|
|
69
|
-
minimatch: "^10.2.1",
|
|
70
|
-
"node-stdlib-browser": "^1.3.1",
|
|
71
|
-
"npm-packlist": "^5.0.0",
|
|
72
|
-
ora: "^5.3.0",
|
|
73
|
-
"p-queue": "^6.6.2",
|
|
74
|
-
pirates: "^4.0.6",
|
|
75
|
-
postcss: "^8.1.0",
|
|
76
|
-
"postcss-import": "^16.1.0",
|
|
77
|
-
process: "^0.11.10",
|
|
78
|
-
"raw-loader": "^4.0.2",
|
|
79
|
-
"react-dev-utils": "^12.0.0-next.60",
|
|
80
|
-
"react-refresh": "^0.17.0",
|
|
81
|
-
"recursive-readdir": "^2.2.2",
|
|
82
|
-
"replace-in-file": "^7.1.0",
|
|
83
|
-
rollup: "^4.27.3",
|
|
84
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
85
|
-
"rollup-plugin-esbuild": "^6.1.1",
|
|
86
|
-
"rollup-plugin-postcss": "^4.0.0",
|
|
87
|
-
"rollup-pluginutils": "^2.8.2",
|
|
88
|
-
semver: "^7.5.3",
|
|
89
|
-
"style-loader": "^3.3.1",
|
|
90
|
-
sucrase: "^3.20.2",
|
|
91
|
-
"swc-loader": "^0.2.3",
|
|
92
|
-
tar: "^7.5.6",
|
|
93
|
-
"ts-checker-rspack-plugin": "^1.1.5",
|
|
94
|
-
"ts-morph": "^24.0.0",
|
|
95
|
-
undici: "^7.2.3",
|
|
96
|
-
util: "^0.12.3",
|
|
97
|
-
yaml: "^2.0.0",
|
|
98
|
-
yargs: "^16.2.0",
|
|
99
|
-
"yml-loader": "^2.1.0",
|
|
100
|
-
yn: "^4.0.0",
|
|
101
|
-
zod: "^3.25.76",
|
|
102
|
-
"zod-validation-error": "^4.0.2"
|
|
103
|
-
};
|
|
104
|
-
var devDependencies = {
|
|
105
|
-
"@backstage/backend-plugin-api": "workspace:^",
|
|
106
|
-
"@backstage/backend-test-utils": "workspace:^",
|
|
107
|
-
"@backstage/catalog-client": "workspace:^",
|
|
108
|
-
"@backstage/config": "workspace:^",
|
|
109
|
-
"@backstage/core-app-api": "workspace:^",
|
|
110
|
-
"@backstage/core-components": "workspace:^",
|
|
111
|
-
"@backstage/core-plugin-api": "workspace:^",
|
|
112
|
-
"@backstage/dev-utils": "workspace:^",
|
|
113
|
-
"@backstage/errors": "workspace:^",
|
|
114
|
-
"@backstage/plugin-auth-backend": "workspace:^",
|
|
115
|
-
"@backstage/plugin-auth-backend-module-guest-provider": "workspace:^",
|
|
116
|
-
"@backstage/plugin-catalog-node": "workspace:^",
|
|
117
|
-
"@backstage/plugin-scaffolder-node": "workspace:^",
|
|
118
|
-
"@backstage/plugin-scaffolder-node-test-utils": "workspace:^",
|
|
119
|
-
"@backstage/test-utils": "workspace:^",
|
|
120
|
-
"@backstage/theme": "workspace:^",
|
|
121
|
-
"@jest/environment-jsdom-abstract": "^30.0.0",
|
|
122
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.0",
|
|
123
|
-
"@types/cross-spawn": "^6.0.2",
|
|
124
|
-
"@types/ejs": "^3.1.3",
|
|
125
|
-
"@types/express": "^4.17.6",
|
|
126
|
-
"@types/fs-extra": "^11.0.0",
|
|
127
|
-
"@types/http-proxy": "^1.17.4",
|
|
128
|
-
"@types/inquirer": "^8.1.3",
|
|
129
|
-
"@types/jest": "^30.0.0",
|
|
130
|
-
"@types/node": "^22.13.14",
|
|
131
|
-
"@types/npm-packlist": "^3.0.0",
|
|
132
|
-
"@types/recursive-readdir": "^2.2.0",
|
|
133
|
-
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
|
|
134
|
-
"@types/rollup-plugin-postcss": "^3.1.4",
|
|
135
|
-
"@types/svgo": "^2.6.2",
|
|
136
|
-
"@types/tar": "^6.1.1",
|
|
137
|
-
"@types/terser-webpack-plugin": "^5.0.4",
|
|
138
|
-
"@types/webpack-sources": "^3.2.3",
|
|
139
|
-
del: "^8.0.0",
|
|
140
|
-
"esbuild-loader": "^4.0.0",
|
|
141
|
-
"eslint-webpack-plugin": "^4.2.0",
|
|
142
|
-
"fork-ts-checker-webpack-plugin": "^9.0.0",
|
|
143
|
-
jest: "^30.2.0",
|
|
144
|
-
jsdom: "^27.1.0",
|
|
145
|
-
"mini-css-extract-plugin": "^2.4.2",
|
|
146
|
-
msw: "^1.0.0",
|
|
147
|
-
nodemon: "^3.0.1",
|
|
148
|
-
"terser-webpack-plugin": "^5.1.3",
|
|
149
|
-
webpack: "~5.105.0",
|
|
150
|
-
"webpack-dev-server": "^5.0.0"
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
exports.dependencies = dependencies;
|
|
154
|
-
exports.devDependencies = devDependencies;
|
|
155
|
-
exports.version = version;
|
|
156
|
-
//# sourceMappingURL=package.json.cjs.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const MESSAGE_MARKER = "eHgtF5hmbrXyiEvo";
|
|
4
|
-
function describeParentCallSite(ErrorConstructor = Error) {
|
|
5
|
-
const { stack } = new ErrorConstructor(MESSAGE_MARKER);
|
|
6
|
-
if (!stack) {
|
|
7
|
-
return "<unknown>";
|
|
8
|
-
}
|
|
9
|
-
const startIndex = stack.includes(MESSAGE_MARKER) ? stack.indexOf("\n") + 1 : 0;
|
|
10
|
-
const secondEntryStart = stack.indexOf("\n", stack.indexOf("\n", startIndex) + 1) + 1;
|
|
11
|
-
const secondEntryEnd = stack.indexOf("\n", secondEntryStart);
|
|
12
|
-
const line = stack.substring(secondEntryStart, secondEntryEnd).trim();
|
|
13
|
-
if (!line) {
|
|
14
|
-
return "unknown";
|
|
15
|
-
}
|
|
16
|
-
if (line.includes("(")) {
|
|
17
|
-
return line.substring(line.indexOf("(") + 1, line.indexOf(")"));
|
|
18
|
-
}
|
|
19
|
-
if (line.includes("@")) {
|
|
20
|
-
return line.substring(line.indexOf("@") + 1);
|
|
21
|
-
}
|
|
22
|
-
return line;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
exports.describeParentCallSite = describeParentCallSite;
|
|
26
|
-
//# sourceMappingURL=describeParentCallSite.cjs.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
class CommandRegistry {
|
|
4
|
-
graph;
|
|
5
|
-
constructor(graph) {
|
|
6
|
-
this.graph = graph;
|
|
7
|
-
}
|
|
8
|
-
addCommand(command) {
|
|
9
|
-
this.graph.add(command);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
exports.CommandRegistry = CommandRegistry;
|
|
14
|
-
//# sourceMappingURL=CommandRegistry.cjs.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var describeParentCallSite = require('../packages/frontend-plugin-api/src/routing/describeParentCallSite.cjs.js');
|
|
4
|
-
var types = require('./types.cjs.js');
|
|
5
|
-
|
|
6
|
-
function createCliPlugin(options) {
|
|
7
|
-
return types.OpaqueCliPlugin.createInstance("v1", {
|
|
8
|
-
pluginId: options.pluginId,
|
|
9
|
-
init: options.init,
|
|
10
|
-
description: `created at '${describeParentCallSite.describeParentCallSite()}'`
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.createCliPlugin = createCliPlugin;
|
|
15
|
-
//# sourceMappingURL=factory.cjs.js.map
|
package/dist/wiring/lazy.cjs.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var errors = require('@backstage/errors');
|
|
4
|
-
var errors$1 = require('./errors.cjs.js');
|
|
5
|
-
|
|
6
|
-
function lazy(moduleLoader, exportName) {
|
|
7
|
-
return async (...args) => {
|
|
8
|
-
try {
|
|
9
|
-
const mod = await moduleLoader();
|
|
10
|
-
const actualModule = mod.default;
|
|
11
|
-
const actionFunc = actualModule[exportName];
|
|
12
|
-
await actionFunc(...args);
|
|
13
|
-
process.exit(0);
|
|
14
|
-
} catch (error) {
|
|
15
|
-
errors.assertError(error);
|
|
16
|
-
errors$1.exitWithError(error);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.lazy = lazy;
|
|
22
|
-
//# sourceMappingURL=lazy.cjs.js.map
|
package/dist/wiring/types.cjs.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var OpaqueType = require('../packages/opaque-internal/src/OpaqueType.cjs.js');
|
|
4
|
-
|
|
5
|
-
const OpaqueCliPlugin = OpaqueType.OpaqueType.create({
|
|
6
|
-
type: "@backstage/CliPlugin",
|
|
7
|
-
versions: ["v1"]
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
exports.OpaqueCliPlugin = OpaqueCliPlugin;
|
|
11
|
-
//# sourceMappingURL=types.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# {{pluginId}}
|
|
2
|
-
|
|
3
|
-
This plugin backend was templated using the Backstage CLI. You should replace this text with a description of your plugin backend.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
This plugin is installed via the `{{packageName}}` package. To install it to your backend package, run the following command:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# From your root directory
|
|
11
|
-
yarn --cwd packages/backend add {{packageName}}
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Then add the plugin to your backend in `packages/backend/src/index.ts`:
|
|
15
|
-
|
|
16
|
-
```ts
|
|
17
|
-
const backend = createBackend();
|
|
18
|
-
// ...
|
|
19
|
-
backend.add(import('{{packageName}}'));
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Development
|
|
23
|
-
|
|
24
|
-
This plugin backend can be started in a standalone mode from directly in this
|
|
25
|
-
package with `yarn start`. It is a limited setup that is most convenient when
|
|
26
|
-
developing the plugin backend itself.
|
|
27
|
-
|
|
28
|
-
If you want to run the entire project, including the frontend, run `yarn start` from the root directory.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { createBackend } from '@backstage/backend-defaults';
|
|
2
|
-
import { mockServices } from '@backstage/backend-test-utils';
|
|
3
|
-
import { catalogServiceMock } from '@backstage/plugin-catalog-node/testUtils';
|
|
4
|
-
|
|
5
|
-
// TEMPLATE NOTE:
|
|
6
|
-
// This is the development setup for your plugin that wires up a
|
|
7
|
-
// minimal backend that can use both real and mocked plugins and services.
|
|
8
|
-
//
|
|
9
|
-
// Start up the backend by running `yarn start` in the package directory.
|
|
10
|
-
// Once it's up and running, try out the following requests:
|
|
11
|
-
//
|
|
12
|
-
// Create a new todo item, standalone or for the sample component:
|
|
13
|
-
//
|
|
14
|
-
// curl http://localhost:7007/api/{{pluginId}}/todos -H 'Content-Type: application/json' -d '{"title": "My Todo"}'
|
|
15
|
-
// curl http://localhost:7007/api/{{pluginId}}/todos -H 'Content-Type: application/json' -d '{"title": "My Todo", "entityRef": "component:default/sample"}'
|
|
16
|
-
//
|
|
17
|
-
// List TODOs:
|
|
18
|
-
//
|
|
19
|
-
// curl http://localhost:7007/api/{{pluginId}}/todos
|
|
20
|
-
//
|
|
21
|
-
// Explicitly make an unauthenticated request, or with service auth:
|
|
22
|
-
//
|
|
23
|
-
// curl http://localhost:7007/api/{{pluginId}}/todos -H 'Authorization: Bearer mock-none-token'
|
|
24
|
-
// curl http://localhost:7007/api/{{pluginId}}/todos -H 'Authorization: Bearer mock-service-token'
|
|
25
|
-
|
|
26
|
-
const backend = createBackend();
|
|
27
|
-
|
|
28
|
-
// TEMPLATE NOTE:
|
|
29
|
-
// Mocking the auth and httpAuth service allows you to call your plugin API without
|
|
30
|
-
// having to authenticate.
|
|
31
|
-
//
|
|
32
|
-
// If you want to use real auth, you can install the following instead:
|
|
33
|
-
// backend.add(import('@backstage/plugin-auth-backend'));
|
|
34
|
-
// backend.add(import('@backstage/plugin-auth-backend-module-guest-provider'));
|
|
35
|
-
backend.add(mockServices.auth.factory());
|
|
36
|
-
backend.add(mockServices.httpAuth.factory());
|
|
37
|
-
|
|
38
|
-
// TEMPLATE NOTE:
|
|
39
|
-
// Rather than using a real catalog you can use a mock with a fixed set of entities.
|
|
40
|
-
backend.add(
|
|
41
|
-
catalogServiceMock.factory({
|
|
42
|
-
entities: [
|
|
43
|
-
{
|
|
44
|
-
apiVersion: 'backstage.io/v1alpha1',
|
|
45
|
-
kind: 'Component',
|
|
46
|
-
metadata: {
|
|
47
|
-
name: 'sample',
|
|
48
|
-
title: 'Sample Component',
|
|
49
|
-
},
|
|
50
|
-
spec: {
|
|
51
|
-
type: 'service',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
}),
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
backend.add(import('../src'));
|
|
59
|
-
|
|
60
|
-
backend.start();
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"main": "src/index.ts",
|
|
4
|
-
"types": "src/index.ts",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public",
|
|
7
|
-
"main": "dist/index.cjs.js",
|
|
8
|
-
"types": "dist/index.d.ts"
|
|
9
|
-
},
|
|
10
|
-
"backstage": {
|
|
11
|
-
"role": "backend-plugin",
|
|
12
|
-
"pluginId": "{{pluginId}}"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"start": "backstage-cli package start",
|
|
16
|
-
"build": "backstage-cli package build",
|
|
17
|
-
"lint": "backstage-cli package lint",
|
|
18
|
-
"test": "backstage-cli package test",
|
|
19
|
-
"clean": "backstage-cli package clean",
|
|
20
|
-
"prepack": "backstage-cli package prepack",
|
|
21
|
-
"postpack": "backstage-cli package postpack"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@backstage/backend-defaults": "{{versionQuery '@backstage/backend-defaults'}}",
|
|
25
|
-
"@backstage/backend-plugin-api": "{{versionQuery '@backstage/backend-plugin-api'}}",
|
|
26
|
-
"@backstage/catalog-client": "{{versionQuery '@backstage/catalog-client'}}",
|
|
27
|
-
"@backstage/errors": "{{versionQuery '@backstage/errors'}}",
|
|
28
|
-
"@backstage/types": "{{versionQuery '@backstage/types'}}",
|
|
29
|
-
"@backstage/plugin-catalog-node": "{{versionQuery '@backstage/plugin-catalog-node'}}",
|
|
30
|
-
"express": "{{versionQuery 'express' '4.17.1'}}",
|
|
31
|
-
"express-promise-router": "{{versionQuery 'express-promise-router' '4.1.0'}}",
|
|
32
|
-
"zod": "{{versionQuery 'zod' '3.25.76'}}"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@backstage/backend-test-utils": "{{versionQuery '@backstage/backend-test-utils'}}",
|
|
36
|
-
"@backstage/cli": "{{versionQuery '@backstage/cli'}}",
|
|
37
|
-
"@types/express": "{{versionQuery '@types/express' '4.17.6'}}",
|
|
38
|
-
"@types/supertest": "{{versionQuery '@types/supertest' '2.0.12'}}",
|
|
39
|
-
"supertest": "{{versionQuery 'supertest' '6.2.4'}}"
|
|
40
|
-
},
|
|
41
|
-
"files": [
|
|
42
|
-
"dist"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { {{pluginVar}} as default } from './plugin';
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
mockCredentials,
|
|
3
|
-
startTestBackend,
|
|
4
|
-
} from '@backstage/backend-test-utils';
|
|
5
|
-
import { createServiceFactory } from '@backstage/backend-plugin-api';
|
|
6
|
-
import { todoListServiceRef } from './services/TodoListService';
|
|
7
|
-
import { {{pluginVar}} } from './plugin';
|
|
8
|
-
import request from 'supertest';
|
|
9
|
-
import { catalogServiceMock } from '@backstage/plugin-catalog-node/testUtils';
|
|
10
|
-
import {
|
|
11
|
-
ConflictError,
|
|
12
|
-
AuthenticationError,
|
|
13
|
-
NotAllowedError,
|
|
14
|
-
} from '@backstage/errors';
|
|
15
|
-
|
|
16
|
-
// TEMPLATE NOTE:
|
|
17
|
-
// Plugin tests are integration tests for your plugin, ensuring that all pieces
|
|
18
|
-
// work together end-to-end. You can still mock injected backend services
|
|
19
|
-
// however, just like anyone who installs your plugin might replace the
|
|
20
|
-
// services with their own implementations.
|
|
21
|
-
describe('plugin', () => {
|
|
22
|
-
it('should create and read TODO items', async () => {
|
|
23
|
-
const { server } = await startTestBackend({
|
|
24
|
-
features: [{{pluginVar}}],
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
await request(server).get('/api/{{pluginId}}/todos').expect(200, {
|
|
28
|
-
items: [],
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
const createRes = await request(server)
|
|
32
|
-
.post('/api/{{pluginId}}/todos')
|
|
33
|
-
.send({ title: 'My Todo' });
|
|
34
|
-
|
|
35
|
-
expect(createRes.status).toBe(201);
|
|
36
|
-
expect(createRes.body).toEqual({
|
|
37
|
-
id: expect.any(String),
|
|
38
|
-
title: 'My Todo',
|
|
39
|
-
createdBy: mockCredentials.user().principal.userEntityRef,
|
|
40
|
-
createdAt: expect.any(String),
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const createdTodoItem = createRes.body;
|
|
44
|
-
|
|
45
|
-
await request(server)
|
|
46
|
-
.get('/api/{{pluginId}}/todos')
|
|
47
|
-
.expect(200, {
|
|
48
|
-
items: [createdTodoItem],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
await request(server)
|
|
52
|
-
.get(`/api/{{pluginId}}/todos/${createdTodoItem.id}`)
|
|
53
|
-
.expect(200, createdTodoItem);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('should create TODO item with catalog information', async () => {
|
|
57
|
-
const { server } = await startTestBackend({
|
|
58
|
-
features: [
|
|
59
|
-
{{pluginVar}},
|
|
60
|
-
catalogServiceMock.factory({
|
|
61
|
-
entities: [
|
|
62
|
-
{
|
|
63
|
-
apiVersion: 'backstage.io/v1alpha1',
|
|
64
|
-
kind: 'Component',
|
|
65
|
-
metadata: {
|
|
66
|
-
name: 'my-component',
|
|
67
|
-
namespace: 'default',
|
|
68
|
-
title: 'My Component',
|
|
69
|
-
},
|
|
70
|
-
spec: {
|
|
71
|
-
type: 'service',
|
|
72
|
-
owner: 'me',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
}),
|
|
77
|
-
],
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const createRes = await request(server)
|
|
81
|
-
.post('/api/{{pluginId}}/todos')
|
|
82
|
-
.send({ title: 'My Todo', entityRef: 'component:default/my-component' });
|
|
83
|
-
|
|
84
|
-
expect(createRes.status).toBe(201);
|
|
85
|
-
expect(createRes.body).toEqual({
|
|
86
|
-
id: expect.any(String),
|
|
87
|
-
title: '[My Component] My Todo',
|
|
88
|
-
createdBy: mockCredentials.user().principal.userEntityRef,
|
|
89
|
-
createdAt: expect.any(String),
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('should forward errors from the TodoListService', async () => {
|
|
94
|
-
const { server } = await startTestBackend({
|
|
95
|
-
features: [
|
|
96
|
-
{{pluginVar}},
|
|
97
|
-
createServiceFactory({
|
|
98
|
-
service: todoListServiceRef,
|
|
99
|
-
deps: {},
|
|
100
|
-
factory: () => ({
|
|
101
|
-
createTodo: jest.fn().mockRejectedValue(new ConflictError()),
|
|
102
|
-
listTodos: jest.fn().mockRejectedValue(new AuthenticationError()),
|
|
103
|
-
getTodo: jest.fn().mockRejectedValue(new NotAllowedError()),
|
|
104
|
-
}),
|
|
105
|
-
})
|
|
106
|
-
],
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const createRes = await request(server)
|
|
110
|
-
.post('/api/{{pluginId}}/todos')
|
|
111
|
-
.send({ title: 'My Todo', entityRef: 'component:default/my-component' });
|
|
112
|
-
expect(createRes.status).toBe(409);
|
|
113
|
-
expect(createRes.body).toMatchObject({
|
|
114
|
-
error: { name: 'ConflictError' },
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const listRes = await request(server).get('/api/{{pluginId}}/todos');
|
|
118
|
-
expect(listRes.status).toBe(401);
|
|
119
|
-
expect(listRes.body).toMatchObject({
|
|
120
|
-
error: { name: 'AuthenticationError' },
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
const getRes = await request(server).get('/api/{{pluginId}}/todos/123');
|
|
124
|
-
expect(getRes.status).toBe(403);
|
|
125
|
-
expect(getRes.body).toMatchObject({
|
|
126
|
-
error: { name: 'NotAllowedError' },
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
});
|