@appsemble/cli 0.20.13 → 0.20.14

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.
Files changed (190) hide show
  1. package/README.md +4 -4
  2. package/__fixtures__/getBlockConfigFromTypeScript/comments/tsconfig.json +1 -1
  3. package/__fixtures__/getBlockConfigFromTypeScript/duplicateActions/tsconfig.json +1 -1
  4. package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventEmitters/tsconfig.json +1 -1
  5. package/__fixtures__/getBlockConfigFromTypeScript/duplicateEventListeners/tsconfig.json +1 -1
  6. package/__fixtures__/getBlockConfigFromTypeScript/duplicateParameters/tsconfig.json +1 -1
  7. package/__fixtures__/getBlockConfigFromTypeScript/fontawesomeParameters/tsconfig.json +1 -1
  8. package/__fixtures__/getBlockConfigFromTypeScript/tsError/tsconfig.json +1 -1
  9. package/__fixtures__/getBlockConfigFromTypeScript/valid/tsconfig.json +1 -1
  10. package/commands/app/create.d.ts +1 -1
  11. package/commands/app/create.js +16 -24
  12. package/commands/app/create.js.map +1 -1
  13. package/commands/app/create.ts +3 -3
  14. package/commands/app/extract-messages.d.ts +1 -1
  15. package/commands/app/extract-messages.js +12 -20
  16. package/commands/app/extract-messages.js.map +1 -1
  17. package/commands/app/extract-messages.ts +2 -2
  18. package/commands/app/index.js +12 -36
  19. package/commands/app/index.js.map +1 -1
  20. package/commands/app/index.ts +9 -5
  21. package/commands/app/update.d.ts +1 -1
  22. package/commands/app/update.js +18 -26
  23. package/commands/app/update.js.map +1 -1
  24. package/commands/app/update.ts +4 -4
  25. package/commands/asset/create.d.ts +1 -1
  26. package/commands/asset/create.js +20 -28
  27. package/commands/asset/create.js.map +1 -1
  28. package/commands/asset/create.ts +4 -4
  29. package/commands/asset/index.js +5 -33
  30. package/commands/asset/index.js.map +1 -1
  31. package/commands/asset/index.ts +3 -3
  32. package/commands/block/build.d.ts +1 -1
  33. package/commands/block/build.js +14 -22
  34. package/commands/block/build.js.map +1 -1
  35. package/commands/block/build.ts +2 -2
  36. package/commands/block/extract-messages.d.ts +1 -1
  37. package/commands/block/extract-messages.js +15 -23
  38. package/commands/block/extract-messages.js.map +1 -1
  39. package/commands/block/extract-messages.ts +2 -2
  40. package/commands/block/index.js +12 -36
  41. package/commands/block/index.js.map +1 -1
  42. package/commands/block/index.ts +9 -5
  43. package/commands/block/publish.d.ts +1 -1
  44. package/commands/block/publish.js +17 -25
  45. package/commands/block/publish.js.map +1 -1
  46. package/commands/block/publish.ts +3 -3
  47. package/commands/cleanupResources.d.ts +1 -1
  48. package/commands/cleanupResources.js +6 -11
  49. package/commands/cleanupResources.js.map +1 -1
  50. package/commands/cleanupResources.ts +2 -2
  51. package/commands/config/get.d.ts +1 -1
  52. package/commands/config/get.js +10 -17
  53. package/commands/config/get.js.map +1 -1
  54. package/commands/config/get.ts +6 -5
  55. package/commands/config/index.js +10 -35
  56. package/commands/config/index.js.map +1 -1
  57. package/commands/config/index.ts +7 -4
  58. package/commands/config/set.d.ts +1 -1
  59. package/commands/config/set.js +15 -22
  60. package/commands/config/set.js.map +1 -1
  61. package/commands/config/set.ts +7 -6
  62. package/commands/login.d.ts +1 -1
  63. package/commands/login.js +3 -7
  64. package/commands/login.js.map +1 -1
  65. package/commands/login.ts +1 -1
  66. package/commands/logout.d.ts +1 -1
  67. package/commands/logout.js +3 -7
  68. package/commands/logout.js.map +1 -1
  69. package/commands/logout.ts +1 -1
  70. package/commands/migrate.d.ts +1 -1
  71. package/commands/migrate.js +8 -16
  72. package/commands/migrate.js.map +1 -1
  73. package/commands/migrate.ts +3 -3
  74. package/commands/organization/create.d.ts +1 -1
  75. package/commands/organization/create.js +10 -15
  76. package/commands/organization/create.js.map +1 -1
  77. package/commands/organization/create.ts +4 -4
  78. package/commands/organization/index.js +10 -35
  79. package/commands/organization/index.js.map +1 -1
  80. package/commands/organization/index.ts +7 -4
  81. package/commands/organization/update.d.ts +1 -1
  82. package/commands/organization/update.js +10 -15
  83. package/commands/organization/update.js.map +1 -1
  84. package/commands/organization/update.ts +4 -4
  85. package/commands/resource/create.d.ts +1 -1
  86. package/commands/resource/create.js +18 -26
  87. package/commands/resource/create.js.map +1 -1
  88. package/commands/resource/create.ts +4 -4
  89. package/commands/resource/index.js +10 -35
  90. package/commands/resource/index.js.map +1 -1
  91. package/commands/resource/index.ts +7 -4
  92. package/commands/resource/update.d.ts +1 -1
  93. package/commands/resource/update.js +18 -26
  94. package/commands/resource/update.js.map +1 -1
  95. package/commands/resource/update.ts +4 -4
  96. package/commands/runCronJobs.d.ts +1 -1
  97. package/commands/runCronJobs.js +6 -11
  98. package/commands/runCronJobs.js.map +1 -1
  99. package/commands/runCronJobs.ts +2 -2
  100. package/commands/start.d.ts +1 -1
  101. package/commands/start.js +10 -15
  102. package/commands/start.js.map +1 -1
  103. package/commands/start.ts +4 -4
  104. package/commands/team/create.d.ts +1 -1
  105. package/commands/team/create.js +10 -15
  106. package/commands/team/create.js.map +1 -1
  107. package/commands/team/create.ts +4 -4
  108. package/commands/team/delete.d.ts +1 -1
  109. package/commands/team/delete.js +10 -15
  110. package/commands/team/delete.js.map +1 -1
  111. package/commands/team/delete.ts +4 -4
  112. package/commands/team/index.js +14 -37
  113. package/commands/team/index.js.map +1 -1
  114. package/commands/team/index.ts +11 -6
  115. package/commands/team/member/delete.d.ts +1 -1
  116. package/commands/team/member/delete.js +10 -15
  117. package/commands/team/member/delete.js.map +1 -1
  118. package/commands/team/member/delete.ts +4 -4
  119. package/commands/team/member/index.js +12 -36
  120. package/commands/team/member/index.js.map +1 -1
  121. package/commands/team/member/index.ts +9 -5
  122. package/commands/team/member/invite.d.ts +1 -1
  123. package/commands/team/member/invite.js +10 -15
  124. package/commands/team/member/invite.js.map +1 -1
  125. package/commands/team/member/invite.ts +4 -4
  126. package/commands/team/member/update.d.ts +1 -1
  127. package/commands/team/member/update.js +12 -17
  128. package/commands/team/member/update.js.map +1 -1
  129. package/commands/team/member/update.ts +4 -4
  130. package/commands/team/update.d.ts +1 -1
  131. package/commands/team/update.js +10 -15
  132. package/commands/team/update.js.map +1 -1
  133. package/commands/team/update.ts +4 -4
  134. package/index.js +66 -94
  135. package/index.js.map +1 -1
  136. package/index.ts +65 -65
  137. package/jest.config.js +3 -1
  138. package/jest.setup.js +3 -5
  139. package/jest.setup.js.map +1 -1
  140. package/jest.setup.ts +1 -1
  141. package/lib/__snapshots__/getBlockConfigFromTypeScript.test.ts.snap +5 -6
  142. package/lib/app.d.ts +1 -1
  143. package/lib/app.js +151 -163
  144. package/lib/app.js.map +1 -1
  145. package/lib/app.ts +7 -7
  146. package/lib/asset.js +11 -18
  147. package/lib/asset.js.map +1 -1
  148. package/lib/authentication.d.ts +1 -1
  149. package/lib/authentication.js +34 -65
  150. package/lib/authentication.js.map +1 -1
  151. package/lib/authentication.ts +3 -2
  152. package/lib/block.js +99 -113
  153. package/lib/block.js.map +1 -1
  154. package/lib/block.test.js +9 -14
  155. package/lib/block.test.js.map +1 -1
  156. package/lib/block.test.ts +1 -1
  157. package/lib/block.ts +5 -5
  158. package/lib/coercers.js +5 -13
  159. package/lib/coercers.js.map +1 -1
  160. package/lib/coercers.test.js +2 -4
  161. package/lib/coercers.test.js.map +1 -1
  162. package/lib/coercers.test.ts +1 -1
  163. package/lib/getBlockConfigFromTypeScript.js +49 -56
  164. package/lib/getBlockConfigFromTypeScript.js.map +1 -1
  165. package/lib/getBlockConfigFromTypeScript.test.js +42 -46
  166. package/lib/getBlockConfigFromTypeScript.test.js.map +1 -1
  167. package/lib/getBlockConfigFromTypeScript.test.ts +7 -6
  168. package/lib/initAxios.d.ts +1 -1
  169. package/lib/initAxios.js +7 -14
  170. package/lib/initAxios.js.map +1 -1
  171. package/lib/initAxios.ts +2 -2
  172. package/lib/loadWebpackConfig.js +14 -45
  173. package/lib/loadWebpackConfig.js.map +1 -1
  174. package/lib/loadWebpackConfig.ts +10 -17
  175. package/lib/organization.js +23 -31
  176. package/lib/organization.js.map +1 -1
  177. package/lib/output.js +5 -9
  178. package/lib/output.js.map +1 -1
  179. package/lib/processCss.js +11 -18
  180. package/lib/processCss.js.map +1 -1
  181. package/lib/resource.js +17 -25
  182. package/lib/resource.js.map +1 -1
  183. package/lib/serverImport.js +6 -34
  184. package/lib/serverImport.js.map +1 -1
  185. package/lib/serverImport.ts +0 -1
  186. package/lib/team.js +28 -41
  187. package/lib/team.js.map +1 -1
  188. package/package.json +11 -10
  189. package/tsconfig.json +0 -1
  190. package/types.js +1 -2
@@ -1,37 +1,12 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.builder = exports.description = exports.command = exports.handler = void 0;
27
- const create = __importStar(require("./create"));
28
- const update = __importStar(require("./update"));
29
- var utils_1 = require("@appsemble/utils");
30
- Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return utils_1.noop; } });
31
- exports.command = 'resource';
32
- exports.description = 'Commands related to resources.';
33
- function builder(yargs) {
34
- return yargs.command(create).command(update).demandCommand(1);
1
+ import * as create from './create.js';
2
+ import * as update from './update.js';
3
+ export { noop as handler } from '@appsemble/utils';
4
+ export const command = 'resource';
5
+ export const description = 'Commands related to resources.';
6
+ export function builder(yargs) {
7
+ return yargs
8
+ .command(create)
9
+ .command(update)
10
+ .demandCommand(1);
35
11
  }
36
- exports.builder = builder;
37
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iDAAmC;AACnC,iDAAmC;AAEnC,0CAAmD;AAA1C,gGAAA,IAAI,OAAW;AAEX,QAAA,OAAO,GAAG,UAAU,CAAC;AACrB,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE5D,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,OAAO,CAAC,MAAkC,CAAC;SAC3C,OAAO,CAAC,MAAkC,CAAC;SAC3C,aAAa,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { Argv } from 'yargs';
1
+ import { Argv, CommandModule } from 'yargs';
2
2
 
3
- import * as create from './create';
4
- import * as update from './update';
3
+ import * as create from './create.js';
4
+ import * as update from './update.js';
5
5
 
6
6
  export { noop as handler } from '@appsemble/utils';
7
7
 
@@ -9,5 +9,8 @@ export const command = 'resource';
9
9
  export const description = 'Commands related to resources.';
10
10
 
11
11
  export function builder(yargs: Argv): Argv {
12
- return yargs.command(create).command(update).demandCommand(1);
12
+ return yargs
13
+ .command(create as unknown as CommandModule)
14
+ .command(update as unknown as CommandModule)
15
+ .demandCommand(1);
13
16
  }
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../../types';
2
+ import { BaseArguments } from '../../types.js';
3
3
  interface CreateResourceArguments extends BaseArguments {
4
4
  resourceName: string;
5
5
  paths: string[];
@@ -1,18 +1,12 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.handler = exports.builder = exports.description = exports.command = void 0;
7
- const node_utils_1 = require("@appsemble/node-utils");
8
- const fast_glob_1 = __importDefault(require("fast-glob"));
9
- const normalize_path_1 = __importDefault(require("normalize-path"));
10
- const app_1 = require("../../lib/app");
11
- const authentication_1 = require("../../lib/authentication");
12
- const resource_1 = require("../../lib/resource");
13
- exports.command = 'update <resource-name> <paths...>';
14
- exports.description = 'Update resources based on a specified JSON file or directory. Entries without the property `id` will be skipped.';
15
- function builder(yargs) {
1
+ import { AppsembleError, logger } from '@appsemble/node-utils';
2
+ import fg from 'fast-glob';
3
+ import normalizePath from 'normalize-path';
4
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
5
+ import { authenticate } from '../../lib/authentication.js';
6
+ import { updateResource } from '../../lib/resource.js';
7
+ export const command = 'update <resource-name> <paths...>';
8
+ export const description = 'Update resources based on a specified JSON file or directory. Entries without the property `id` will be skipped.';
9
+ export function builder(yargs) {
16
10
  return yargs
17
11
  .positional('resource-name', {
18
12
  describe: 'The name of the resource that should be created.',
@@ -36,19 +30,18 @@ function builder(yargs) {
36
30
  demandOption: 'app',
37
31
  });
38
32
  }
39
- exports.builder = builder;
40
- async function handler({ app, appId, clientCredentials, context, paths, remote, resourceName, }) {
41
- const [resolvedAppId, resolvedRemote] = await (0, app_1.resolveAppIdAndRemote)(app, context, remote, appId);
42
- await (0, authentication_1.authenticate)(resolvedRemote, 'resources:write', clientCredentials);
43
- const normalizedPaths = paths.map((path) => (0, normalize_path_1.default)(path));
44
- const files = await (0, fast_glob_1.default)(normalizedPaths, { absolute: true, onlyFiles: true });
33
+ export async function handler({ app, appId, clientCredentials, context, paths, remote, resourceName, }) {
34
+ const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
35
+ await authenticate(resolvedRemote, 'resources:write', clientCredentials);
36
+ const normalizedPaths = paths.map((path) => normalizePath(path));
37
+ const files = await fg(normalizedPaths, { absolute: true, onlyFiles: true });
45
38
  if (!files.length) {
46
- throw new node_utils_1.AppsembleError('No JSON files found.');
39
+ throw new AppsembleError('No JSON files found.');
47
40
  }
48
- node_utils_1.logger.info(`Updating resources based on ${files.length} files`);
41
+ logger.info(`Updating resources based on ${files.length} files`);
49
42
  for (const path of files) {
50
- node_utils_1.logger.info('');
51
- await (0, resource_1.updateResource)({
43
+ logger.info('');
44
+ await updateResource({
52
45
  resourceName,
53
46
  appId: resolvedAppId,
54
47
  path,
@@ -56,5 +49,4 @@ async function handler({ app, appId, clientCredentials, context, paths, remote,
56
49
  });
57
50
  }
58
51
  }
59
- exports.handler = handler;
60
52
  //# sourceMappingURL=update.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["update.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA+D;AAC/D,0DAA2B;AAC3B,oEAA2C;AAG3C,uCAAsD;AACtD,6DAAwD;AACxD,iDAAoD;AAWvC,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,WAAW,GACtB,kHAAkH,CAAC;AAErH,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT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,QAAQ,EAAE,gEAAgE;QAC1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,MAAM,EACN,YAAY,GACY;IACxB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,YAAY,CAAC,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IAEzE,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7E,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,MAAM,IAAI,cAAc,CAAC,sBAAsB,CAAC,CAAC;KAClD;IAED,MAAM,CAAC,IAAI,CAAC,+BAA+B,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;IACjE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,MAAM,cAAc,CAAC;YACnB,YAAY;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI;YACJ,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC;KACJ;AACH,CAAC"}
@@ -3,10 +3,10 @@ import fg from 'fast-glob';
3
3
  import normalizePath from 'normalize-path';
4
4
  import { Argv } from 'yargs';
5
5
 
6
- import { resolveAppIdAndRemote } from '../../lib/app';
7
- import { authenticate } from '../../lib/authentication';
8
- import { updateResource } from '../../lib/resource';
9
- import { BaseArguments } from '../../types';
6
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
7
+ import { authenticate } from '../../lib/authentication.js';
8
+ import { updateResource } from '../../lib/resource.js';
9
+ import { BaseArguments } from '../../types.js';
10
10
 
11
11
  interface CreateResourceArguments extends BaseArguments {
12
12
  resourceName: string;
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../types';
2
+ import { BaseArguments } from '../types.js';
3
3
  export declare const command = "run-cronjobs";
4
4
  export declare const description = "Runs all cronjobs associated with apps.";
5
5
  export declare function builder(yargs: Argv): Argv<any>;
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.description = exports.command = void 0;
4
- const serverImport_1 = require("../lib/serverImport");
5
- exports.command = 'run-cronjobs';
6
- exports.description = 'Runs all cronjobs associated with apps.';
7
- function builder(yargs) {
1
+ import { serverImport } from '../lib/serverImport.js';
2
+ export const command = 'run-cronjobs';
3
+ export const description = 'Runs all cronjobs associated with apps.';
4
+ export function builder(yargs) {
8
5
  return yargs
9
6
  .option('database-host', {
10
7
  desc: 'The host of the database to connect to. This defaults to the connected database container.',
@@ -35,11 +32,9 @@ function builder(yargs) {
35
32
  conflicts: ['database-host', 'database-name', 'database-user', 'database-password'],
36
33
  });
37
34
  }
38
- exports.builder = builder;
39
- async function handler(argv) {
40
- const { runCronJobs, setArgv } = await (0, serverImport_1.serverImport)('setArgv', 'runCronJobs');
35
+ export async function handler(argv) {
36
+ const { runCronJobs, setArgv } = await serverImport('setArgv', 'runCronJobs');
41
37
  setArgv(argv);
42
38
  return runCronJobs();
43
39
  }
44
- exports.handler = handler;
45
40
  //# sourceMappingURL=runCronJobs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runCronJobs.js","sourceRoot":"","sources":["runCronJobs.ts"],"names":[],"mappings":";;;AAEA,sDAAmD;AAGtC,QAAA,OAAO,GAAG,cAAc,CAAC;AACzB,QAAA,WAAW,GAAG,y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../lib/serverImport';
4
- import { BaseArguments } from '../types';
3
+ import { serverImport } from '../lib/serverImport.js';
4
+ import { BaseArguments } from '../types.js';
5
5
 
6
6
  export const command = 'run-cronjobs';
7
7
  export const description = 'Runs all cronjobs associated with apps.';
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../types';
2
+ import { BaseArguments } from '../types.js';
3
3
  export declare const command = "start";
4
4
  export declare const description = "Start the Appsemble development server.";
5
5
  export declare function builder(yargs: Argv): Argv<any>;
package/commands/start.js CHANGED
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.description = exports.command = void 0;
4
- const block_1 = require("../lib/block");
5
- const loadWebpackConfig_1 = require("../lib/loadWebpackConfig");
6
- const serverImport_1 = require("../lib/serverImport");
7
- exports.command = 'start';
8
- exports.description = 'Start the Appsemble development server.';
9
- function builder(yargs) {
1
+ import { discoverBlocks } from '../lib/block.js';
2
+ import { loadWebpackConfig } from '../lib/loadWebpackConfig.js';
3
+ import { serverImport } from '../lib/serverImport.js';
4
+ export const command = 'start';
5
+ export const description = 'Start the Appsemble development server.';
6
+ export function builder(yargs) {
10
7
  return yargs
11
8
  .option('port', {
12
9
  desc: 'The HTTP server port to use. (Development only)',
@@ -126,13 +123,11 @@ function builder(yargs) {
126
123
  implies: ['ssl', 'ssl-key'],
127
124
  });
128
125
  }
129
- exports.builder = builder;
130
- async function handler(argv) {
131
- const { setArgv, start } = await (0, serverImport_1.serverImport)('setArgv', 'start');
126
+ export async function handler(argv) {
127
+ const { setArgv, start } = await serverImport('setArgv', 'start');
132
128
  setArgv(argv);
133
- const blocks = await (0, block_1.discoverBlocks)(process.cwd());
134
- const webpackConfigs = await Promise.all(blocks.map((block) => (0, loadWebpackConfig_1.loadWebpackConfig)(block, 'development')));
129
+ const blocks = await discoverBlocks(process.cwd());
130
+ const webpackConfigs = await Promise.all(blocks.map((block) => loadWebpackConfig(block, 'development')));
135
131
  return start({ webpackConfigs });
136
132
  }
137
- exports.handler = handler;
138
133
  //# sourceMappingURL=start.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"start.js","sourceRoot":"","sources":["start.ts"],"names":[],"mappings":";;;AAEA,wCAA8C;AAC9C,gEAA6D;AAC7D,sDAAmD;AAGtC,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,WAAW,GAAG,yCAAyC,CAAC;AAErE,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,iDAAiD;QACvD,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;KACd,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,4FAA4F;KACnG,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,yCAAyC;QAC/C,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;KACd,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,qCAAqC;QAC3C,IAAI,EAAE,SAAS;KAChB,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;KAChD,CAAC;SACD,MAAM,CAAC,eAAe,EAAE;QACvB,IAAI,EAAE,2CAA2C;QACjD,OAAO,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;KAChD,CAAC;SACD,MAAM,CAAC,mBAAmB,EAAE;QAC3B,IAAI,EAAE,+CAA+C;QACrD,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;KAC5C,CAAC;SACD,MAAM,CAAC,cAAc,EAAE;QACtB,IAAI,EAAE,wHAAwH;QAC9H,SAAS,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,CAAC;KACpF,CAAC;SACD,MAAM,CAAC,Y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IAClE,OAAO,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,GAAG,CACtC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAC/D,CAAC;IACF,OAAO,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;AACnC,CAAC"}
package/commands/start.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Argv } from 'yargs';
2
2
 
3
- import { discoverBlocks } from '../lib/block';
4
- import { loadWebpackConfig } from '../lib/loadWebpackConfig';
5
- import { serverImport } from '../lib/serverImport';
6
- import { BaseArguments } from '../types';
3
+ import { discoverBlocks } from '../lib/block.js';
4
+ import { loadWebpackConfig } from '../lib/loadWebpackConfig.js';
5
+ import { serverImport } from '../lib/serverImport.js';
6
+ import { BaseArguments } from '../types.js';
7
7
 
8
8
  export const command = 'start';
9
9
  export const description = 'Start the Appsemble development server.';
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../../types';
2
+ import { BaseArguments } from '../../types.js';
3
3
  interface CreateTeamArguments extends BaseArguments {
4
4
  appId: number;
5
5
  name: string;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.description = exports.command = void 0;
4
- const app_1 = require("../../lib/app");
5
- const authentication_1 = require("../../lib/authentication");
6
- const team_1 = require("../../lib/team");
7
- exports.command = 'create <name>';
8
- exports.description = 'Create a new team for an app.';
9
- function builder(yargs) {
1
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
2
+ import { authenticate } from '../../lib/authentication.js';
3
+ import { createTeam } from '../../lib/team.js';
4
+ export const command = 'create <name>';
5
+ export const description = 'Create a new team for an app.';
6
+ export function builder(yargs) {
10
7
  return yargs
11
8
  .positional('name', {
12
9
  describe: 'The name of the team.',
@@ -29,16 +26,14 @@ function builder(yargs) {
29
26
  demandOption: 'app',
30
27
  });
31
28
  }
32
- exports.builder = builder;
33
- async function handler({ annotation, app, appId, clientCredentials, context, name, remote, }) {
34
- const [resolvedAppId, resolvedRemote] = await (0, app_1.resolveAppIdAndRemote)(app, context, remote, appId);
35
- await (0, authentication_1.authenticate)(resolvedRemote, 'teams:write', clientCredentials);
36
- await (0, team_1.createTeam)({
29
+ export async function handler({ annotation, app, appId, clientCredentials, context, name, remote, }) {
30
+ const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
31
+ await authenticate(resolvedRemote, 'teams:write', clientCredentials);
32
+ await createTeam({
37
33
  name,
38
34
  appId: resolvedAppId,
39
35
  annotations: annotation,
40
36
  remote: resolvedRemote,
41
37
  });
42
38
  }
43
- exports.handler = handler;
44
39
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["create.ts"],"names":[],"mappings":";;;AAEA,uCAAsD;AACtD,6DAAwD;AACxD,yCAA4C;AAW/B,QAAA,OAAO,GAAG,eAAe,CAAC;AAC1B,QAAA,WAAW,GAAG,+BAA+B,CAAC;AAE3D,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,uBAAuB;QACjC,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,uDAAuD;KAClE,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,2CAA2C;QACrD,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,SAAS;KACxB,CAAC;SACD,MAAM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Q;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,SAAS;KACxB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,gEAAgE;QAC1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,UAAU,EACV,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,MAAM,GACc;IACpB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,YAAY,CAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,UAAU,CAAC;QACf,IAAI;QACJ,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,UAAU;QACvB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { Argv } from 'yargs';
2
2
 
3
- import { resolveAppIdAndRemote } from '../../lib/app';
4
- import { authenticate } from '../../lib/authentication';
5
- import { createTeam } from '../../lib/team';
6
- import { BaseArguments } from '../../types';
3
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
4
+ import { authenticate } from '../../lib/authentication.js';
5
+ import { createTeam } from '../../lib/team.js';
6
+ import { BaseArguments } from '../../types.js';
7
7
 
8
8
  interface CreateTeamArguments extends BaseArguments {
9
9
  appId: number;
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../../types';
2
+ import { BaseArguments } from '../../types.js';
3
3
  interface DeleteTeamArguments extends BaseArguments {
4
4
  appId: number;
5
5
  id: number;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.description = exports.command = void 0;
4
- const app_1 = require("../../lib/app");
5
- const authentication_1 = require("../../lib/authentication");
6
- const team_1 = require("../../lib/team");
7
- exports.command = 'delete';
8
- exports.description = 'Delete an existing team from an app.';
9
- function builder(yargs) {
1
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
2
+ import { authenticate } from '../../lib/authentication.js';
3
+ import { deleteTeam } from '../../lib/team.js';
4
+ export const command = 'delete';
5
+ export const description = 'Delete an existing team from an app.';
6
+ export function builder(yargs) {
10
7
  return yargs
11
8
  .option('id', {
12
9
  describe: 'The ID of the team to delete.',
@@ -25,15 +22,13 @@ function builder(yargs) {
25
22
  demandOption: 'app',
26
23
  });
27
24
  }
28
- exports.builder = builder;
29
- async function handler({ app, appId, clientCredentials, context, id, remote, }) {
30
- const [resolvedAppId, resolvedRemote] = await (0, app_1.resolveAppIdAndRemote)(app, context, remote, appId);
31
- await (0, authentication_1.authenticate)(resolvedRemote, 'teams:write', clientCredentials);
32
- await (0, team_1.deleteTeam)({
25
+ export async function handler({ app, appId, clientCredentials, context, id, remote, }) {
26
+ const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
27
+ await authenticate(resolvedRemote, 'teams:write', clientCredentials);
28
+ await deleteTeam({
33
29
  id,
34
30
  appId: resolvedAppId,
35
31
  remote: resolvedRemote,
36
32
  });
37
33
  }
38
- exports.handler = handler;
39
34
  //# sourceMappingURL=delete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["delete.ts"],"names":[],"mappings":";;;AAEA,uCAAsD;AACtD,6DAAwD;AACxD,yCAA4C;AAU/B,QAAA,OAAO,GAAG,QAAQ,CAAC;AACnB,QAAA,WAAW,GAAG,sCAAsC,CAAC;AAElE,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,MAAM,CAAC,IAAI,EAAE;QACZ,QAAQ,EAAE,+BAA+B;QACzC,YAAY,EAAE,IAAI;KACnB,CAAC;S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CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,4CAA4C;QACtD,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,SAAS;KACxB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,gEAAgE;QAC1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,MAAM,GACc;IACpB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEjG,MAAM,YAAY,CAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,UAAU,CAAC;QACf,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { Argv } from 'yargs';
2
2
 
3
- import { resolveAppIdAndRemote } from '../../lib/app';
4
- import { authenticate } from '../../lib/authentication';
5
- import { deleteTeam } from '../../lib/team';
6
- import { BaseArguments } from '../../types';
3
+ import { resolveAppIdAndRemote } from '../../lib/app.js';
4
+ import { authenticate } from '../../lib/authentication.js';
5
+ import { deleteTeam } from '../../lib/team.js';
6
+ import { BaseArguments } from '../../types.js';
7
7
 
8
8
  interface DeleteTeamArguments extends BaseArguments {
9
9
  appId: number;
@@ -1,39 +1,16 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.builder = exports.description = exports.command = exports.handler = void 0;
27
- const create = __importStar(require("./create"));
28
- const deleteTeam = __importStar(require("./delete"));
29
- const member = __importStar(require("./member"));
30
- const update = __importStar(require("./update"));
31
- var utils_1 = require("@appsemble/utils");
32
- Object.defineProperty(exports, "handler", { enumerable: true, get: function () { return utils_1.noop; } });
33
- exports.command = 'team';
34
- exports.description = 'Commands related to app teams.';
35
- function builder(yargs) {
36
- return yargs.command(create).command(deleteTeam).command(member).command(update).demandCommand(1);
1
+ import * as create from './create.js';
2
+ import * as deleteTeam from './delete.js';
3
+ import * as member from './member/index.js';
4
+ import * as update from './update.js';
5
+ export { noop as handler } from '@appsemble/utils';
6
+ export const command = 'team';
7
+ export const description = 'Commands related to app teams.';
8
+ export function builder(yargs) {
9
+ return yargs
10
+ .command(create)
11
+ .command(deleteTeam)
12
+ .command(member)
13
+ .command(update)
14
+ .demandCommand(1);
37
15
  }
38
- exports.builder = builder;
39
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iDAAmC;AACnC,qDAAuC;AACvC,iDAAmC;AACnC,iDAAmC;AAEnC,0CAAmD;AAA1C,gGAAA,IAAI,OAAW;AAEX,QAAA,OAAO,GAAG,MAAM,CAAC;AACjB,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE5D,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AACpG,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAC9B,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,OAAO,CAAC,MAAkC,CAAC;SAC3C,OAAO,CAAC,UAAsC,CAAC;SAC/C,OAAO,CAAC,MAAM,CAAC;SACf,OAAO,CAAC,MAAkC,CAAC;SAC3C,aAAa,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -1,9 +1,9 @@
1
- import { Argv } from 'yargs';
1
+ import { Argv, CommandModule } from 'yargs';
2
2
 
3
- import * as create from './create';
4
- import * as deleteTeam from './delete';
5
- import * as member from './member';
6
- import * as update from './update';
3
+ import * as create from './create.js';
4
+ import * as deleteTeam from './delete.js';
5
+ import * as member from './member/index.js';
6
+ import * as update from './update.js';
7
7
 
8
8
  export { noop as handler } from '@appsemble/utils';
9
9
 
@@ -11,5 +11,10 @@ export const command = 'team';
11
11
  export const description = 'Commands related to app teams.';
12
12
 
13
13
  export function builder(yargs: Argv): Argv {
14
- return yargs.command(create).command(deleteTeam).command(member).command(update).demandCommand(1);
14
+ return yargs
15
+ .command(create as unknown as CommandModule)
16
+ .command(deleteTeam as unknown as CommandModule)
17
+ .command(member)
18
+ .command(update as unknown as CommandModule)
19
+ .demandCommand(1);
15
20
  }
@@ -1,5 +1,5 @@
1
1
  import { Argv } from 'yargs';
2
- import { BaseArguments } from '../../../types';
2
+ import { BaseArguments } from '../../../types.js';
3
3
  interface DeleteTeamArguments extends BaseArguments {
4
4
  appId: number;
5
5
  id: number;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.builder = exports.description = exports.command = void 0;
4
- const app_1 = require("../../../lib/app");
5
- const authentication_1 = require("../../../lib/authentication");
6
- const team_1 = require("../../../lib/team");
7
- exports.command = 'delete <user>';
8
- exports.description = 'Delete a new member to an existing team from an app.';
9
- function builder(yargs) {
1
+ import { resolveAppIdAndRemote } from '../../../lib/app.js';
2
+ import { authenticate } from '../../../lib/authentication.js';
3
+ import { deleteMember } from '../../../lib/team.js';
4
+ export const command = 'delete <user>';
5
+ export const description = 'Delete a new member to an existing team from an app.';
6
+ export function builder(yargs) {
10
7
  return yargs
11
8
  .option('id', {
12
9
  describe: 'The ID of the team.',
@@ -29,16 +26,14 @@ function builder(yargs) {
29
26
  demandOption: 'app',
30
27
  });
31
28
  }
32
- exports.builder = builder;
33
- async function handler({ app, appId, clientCredentials, context, id, remote, user, }) {
34
- const [resolvedAppId, resolvedRemote] = await (0, app_1.resolveAppIdAndRemote)(app, context, remote, appId);
35
- await (0, authentication_1.authenticate)(resolvedRemote, 'teams:write', clientCredentials);
36
- await (0, team_1.deleteMember)({
29
+ export async function handler({ app, appId, clientCredentials, context, id, remote, user, }) {
30
+ const [resolvedAppId, resolvedRemote] = await resolveAppIdAndRemote(app, context, remote, appId);
31
+ await authenticate(resolvedRemote, 'teams:write', clientCredentials);
32
+ await deleteMember({
37
33
  id,
38
34
  appId: resolvedAppId,
39
35
  user,
40
36
  remote: resolvedRemote,
41
37
  });
42
38
  }
43
- exports.handler = handler;
44
39
  //# sourceMappingURL=delete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["delete.ts"],"names":[],"mappings":";;;AAEA,0CAAyD;AACzD,gEAA2D;AAC3D,4CAAiD;AAWpC,QAAA,OAAO,GAAG,eAAe,CAAC;AAC1B,QAAA,WAAW,GAAG,sDAAsD,CAAC;AAElF,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,MAAM,CAAC,IAAI,EAAE;QACZ,QAAQ,EAAE,qBAAqB;QAC/B,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,yDAAyD;QACnE,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,SAAS;KACxB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,QAAQ,EAAE,gEAAgE;QAC1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAtBD,0BAsBC;AAEM,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,MAAM,EACN,IAAI,GACgB;IACpB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,IAAA,2BAAqB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEjG,MAAM,IAAA,6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