lucid-package 0.0.8 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-package",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -65,6 +65,26 @@ async function debugEditorExtension(name) {
65
65
  const manifest = await (0, packagemanifest_1.readManifest)('../../');
66
66
  res.send(JSON.stringify((_a = manifest['extensions'].find((extension) => extension['name'] === name)) === null || _a === void 0 ? void 0 : _a.scopes));
67
67
  });
68
+ app.get('/packageId', async (req, res) => {
69
+ var _a;
70
+ const manifest = await (0, packagemanifest_1.readManifest)('../../');
71
+ res.send((_a = manifest['id']) !== null && _a !== void 0 ? _a : '__local__');
72
+ });
73
+ app.get('/editorextension', async (req, res) => {
74
+ var _a, _b;
75
+ const manifest = await (0, packagemanifest_1.readManifest)('../../');
76
+ const extensionManifest = manifest['extensions'].find((one) => one['name'] === name);
77
+ res.send({
78
+ id: '__local__',
79
+ packageId: (_a = manifest['id']) !== null && _a !== void 0 ? _a : '__local__',
80
+ packageVersionId: '__local__',
81
+ version: manifest['version'],
82
+ name: name,
83
+ title: (_b = extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest['title']) !== null && _b !== void 0 ? _b : 'Local dev extension',
84
+ scopes: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest['scopes'],
85
+ codeUrl: 'http://localhost:9900/extension.js',
86
+ });
87
+ });
68
88
  app.listen(9900, () => {
69
89
  console.log('Listening at http://localhost:9900/extension.js');
70
90
  });
package/src/index.js CHANGED
@@ -7,7 +7,7 @@ const shapelibrary_1 = require("./shapelibrary");
7
7
  class LucidSuiteExtensionCLI {
8
8
  run(args) {
9
9
  const parser = new argparse_1.ArgumentParser({
10
- description: 'Create and manage Lucid extensibility packages',
10
+ description: 'Create and manage Lucid extension packages',
11
11
  });
12
12
  //When running with `bazel run //extensibility/lucid-package:dev`, this gives the root directory to create projects in.
13
13
  parser.add_argument('--chdir', { type: 'str', help: argparse_1.SUPPRESS });
@@ -18,10 +18,10 @@ class LucidSuiteExtensionCLI {
18
18
  });
19
19
  const subparsers = parser.add_subparsers({ dest: 'command' });
20
20
  const createParser = subparsers.add_parser('create', {
21
- help: 'Create a new Lucid extensibility package in a new directory',
21
+ help: 'Create a new Lucid extension package in a new directory',
22
22
  });
23
23
  createParser.add_argument('name', { type: 'str' });
24
- const packageParser = subparsers.add_parser('package', {
24
+ const packageParser = subparsers.add_parser('bundle', {
25
25
  help: 'Prepare the current package for upload to the developer dashboard',
26
26
  });
27
27
  const updateSDKParser = subparsers.add_parser('update-sdk', {
@@ -64,12 +64,12 @@ class LucidSuiteExtensionCLI {
64
64
  case 'create':
65
65
  (0, package_1.createEmptyPackage)(parsed['name']);
66
66
  break;
67
- case 'package':
67
+ case 'bundle':
68
68
  if ((0, package_1.currentlyInPackage)()) {
69
69
  (0, package_1.writePackage)();
70
70
  }
71
71
  else {
72
- console.error('Not currently in a Lucid extensibility package folder');
72
+ console.error('Not currently in a Lucid extension package folder');
73
73
  }
74
74
  break;
75
75
  case 'update-sdk':
@@ -77,7 +77,7 @@ class LucidSuiteExtensionCLI {
77
77
  (0, package_1.updateAllExtensionSDK)();
78
78
  }
79
79
  else {
80
- console.error('Not currently in a Lucid extensibility package folder');
80
+ console.error('Not currently in a Lucid extension package folder');
81
81
  }
82
82
  break;
83
83
  case 'create-editor-extension':
@@ -85,7 +85,7 @@ class LucidSuiteExtensionCLI {
85
85
  (0, editorextension_1.createEditorExtension)(parsed['name'], isInternalTesting);
86
86
  }
87
87
  else {
88
- console.error('Not currently in a Lucid extensibility package folder');
88
+ console.error('Not currently in a Lucid extension package folder');
89
89
  }
90
90
  break;
91
91
  case 'build-editor-extension':
@@ -93,7 +93,7 @@ class LucidSuiteExtensionCLI {
93
93
  (0, editorextension_1.buildEditorExtension)(parsed['name']);
94
94
  }
95
95
  else {
96
- console.error('Not currently in a Lucid extensibility package folder');
96
+ console.error('Not currently in a Lucid extension package folder');
97
97
  }
98
98
  break;
99
99
  case 'create-shape-library':
@@ -101,7 +101,7 @@ class LucidSuiteExtensionCLI {
101
101
  (0, shapelibrary_1.createEmptyShapeLibrary)(parsed['name']);
102
102
  }
103
103
  else {
104
- console.error('Not currently in a Lucid extensibility package folder');
104
+ console.error('Not currently in a Lucid extension package folder');
105
105
  }
106
106
  break;
107
107
  case 'test-shape-libraries':
@@ -109,7 +109,7 @@ class LucidSuiteExtensionCLI {
109
109
  (0, shapelibrary_1.debugShapeLibraries)();
110
110
  }
111
111
  else {
112
- console.error('Not currently in a Lucid extensibility package folder');
112
+ console.error('Not currently in a Lucid extension package folder');
113
113
  }
114
114
  break;
115
115
  case 'test-editor-extension':
@@ -117,7 +117,7 @@ class LucidSuiteExtensionCLI {
117
117
  (0, editorextension_1.debugEditorExtension)(parsed['name']);
118
118
  }
119
119
  else {
120
- console.error('Not currently in a Lucid extensibility package folder');
120
+ console.error('Not currently in a Lucid extension package folder');
121
121
  }
122
122
  break;
123
123
  default:
@@ -1,4 +1,5 @@
1
1
  export declare type PackageManifest = {
2
+ 'id'?: string;
2
3
  'version': string;
3
4
  'extensions': {
4
5
  'name': string;
@@ -1,5 +1,7 @@
1
1
  {
2
- "version": "1.0.0",
3
- "extensions": [],
4
- "shapeLibraries":[]
2
+ "id": "",
3
+ "version": "1.0.0",
4
+ "extensions": [],
5
+ "shapeLibraries": [],
6
+ "oauthProviders": []
5
7
  }