@appsemble/cli 0.19.14 → 0.20.1

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 (89) hide show
  1. package/dist/commands/app/create.js +3 -3
  2. package/dist/commands/app/create.js.map +1 -1
  3. package/dist/commands/app/extract-messages.js +3 -3
  4. package/dist/commands/app/extract-messages.js.map +1 -1
  5. package/dist/commands/app/update.js +4 -4
  6. package/dist/commands/app/update.js.map +1 -1
  7. package/dist/commands/app.js +1 -1
  8. package/dist/commands/app.js.map +1 -1
  9. package/dist/commands/asset/create.js +6 -6
  10. package/dist/commands/asset/create.js.map +1 -1
  11. package/dist/commands/asset.js +1 -1
  12. package/dist/commands/asset.js.map +1 -1
  13. package/dist/commands/block/build.js +4 -4
  14. package/dist/commands/block/build.js.map +1 -1
  15. package/dist/commands/block/extract-messages.js +4 -4
  16. package/dist/commands/block/extract-messages.js.map +1 -1
  17. package/dist/commands/block/publish.js +6 -6
  18. package/dist/commands/block/publish.js.map +1 -1
  19. package/dist/commands/block.js +1 -1
  20. package/dist/commands/block.js.map +1 -1
  21. package/dist/commands/cleanupResources.js +1 -1
  22. package/dist/commands/cleanupResources.js.map +1 -1
  23. package/dist/commands/config/get.js +2 -2
  24. package/dist/commands/config/get.js.map +1 -1
  25. package/dist/commands/config/set.js +4 -4
  26. package/dist/commands/config/set.js.map +1 -1
  27. package/dist/commands/config.js +1 -1
  28. package/dist/commands/config.js.map +1 -1
  29. package/dist/commands/migrate.js +2 -2
  30. package/dist/commands/migrate.js.map +1 -1
  31. package/dist/commands/organization/create.js +2 -2
  32. package/dist/commands/organization/create.js.map +1 -1
  33. package/dist/commands/organization/update.js +2 -2
  34. package/dist/commands/organization/update.js.map +1 -1
  35. package/dist/commands/organization.js +1 -1
  36. package/dist/commands/organization.js.map +1 -1
  37. package/dist/commands/resource/create.js +5 -5
  38. package/dist/commands/resource/create.js.map +1 -1
  39. package/dist/commands/resource/update.js +5 -5
  40. package/dist/commands/resource/update.js.map +1 -1
  41. package/dist/commands/resource.js +1 -1
  42. package/dist/commands/resource.js.map +1 -1
  43. package/dist/commands/runCronJobs.js +1 -1
  44. package/dist/commands/runCronJobs.js.map +1 -1
  45. package/dist/commands/start.js +3 -3
  46. package/dist/commands/start.js.map +1 -1
  47. package/dist/commands/team/create.js +3 -3
  48. package/dist/commands/team/create.js.map +1 -1
  49. package/dist/commands/team/delete.js +3 -3
  50. package/dist/commands/team/delete.js.map +1 -1
  51. package/dist/commands/team/member/delete.js +3 -3
  52. package/dist/commands/team/member/delete.js.map +1 -1
  53. package/dist/commands/team/member/invite.js +3 -3
  54. package/dist/commands/team/member/invite.js.map +1 -1
  55. package/dist/commands/team/member/update.js +3 -3
  56. package/dist/commands/team/member/update.js.map +1 -1
  57. package/dist/commands/team/member.js +1 -1
  58. package/dist/commands/team/member.js.map +1 -1
  59. package/dist/commands/team/update.js +3 -3
  60. package/dist/commands/team/update.js.map +1 -1
  61. package/dist/commands/team.js +1 -1
  62. package/dist/commands/team.js.map +1 -1
  63. package/dist/index.js +3 -3
  64. package/dist/index.js.map +1 -1
  65. package/dist/lib/app.js +65 -66
  66. package/dist/lib/app.js.map +1 -1
  67. package/dist/lib/asset.js +3 -3
  68. package/dist/lib/asset.js.map +1 -1
  69. package/dist/lib/authentication.js +6 -7
  70. package/dist/lib/authentication.js.map +1 -1
  71. package/dist/lib/block.js +34 -34
  72. package/dist/lib/block.js.map +1 -1
  73. package/dist/lib/coercers.js +2 -3
  74. package/dist/lib/coercers.js.map +1 -1
  75. package/dist/lib/getBlockConfigFromTypeScript.js +20 -20
  76. package/dist/lib/getBlockConfigFromTypeScript.js.map +1 -1
  77. package/dist/lib/initAxios.js +2 -2
  78. package/dist/lib/initAxios.js.map +1 -1
  79. package/dist/lib/output.js +2 -2
  80. package/dist/lib/output.js.map +1 -1
  81. package/dist/lib/processCss.js +4 -4
  82. package/dist/lib/processCss.js.map +1 -1
  83. package/dist/lib/readPackageJson.js +1 -1
  84. package/dist/lib/readPackageJson.js.map +1 -1
  85. package/dist/lib/resource.js +5 -6
  86. package/dist/lib/resource.js.map +1 -1
  87. package/dist/lib/serverImport.js +1 -1
  88. package/dist/lib/serverImport.js.map +1 -1
  89. package/package.json +12 -12
@@ -31,9 +31,9 @@ function builder(yargs) {
31
31
  }
32
32
  exports.builder = builder;
33
33
  async function handler({ annotation, app, appId, clientCredentials, context, name, remote, }) {
34
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
35
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
36
- await team_1.createTeam({
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)({
37
37
  name,
38
38
  appId: resolvedAppId,
39
39
  annotations: annotation,
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/team/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,CAAC,SAAS,EAAE;QACj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1E,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACP,CAAC;AAtBD,0BAsBC;AAEM,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,IAAA,2BAAqB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjG,MAAM,IAAA,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,iBAAU,EAAC;QACf,IAAI;QACJ,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,UAAU;QACvB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AAjBD,0BAiBC"}
@@ -27,9 +27,9 @@ function builder(yargs) {
27
27
  }
28
28
  exports.builder = builder;
29
29
  async function handler({ app, appId, clientCredentials, context, id, remote, }) {
30
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
31
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
32
- await team_1.deleteTeam({
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)({
33
33
  id,
34
34
  appId: resolvedAppId,
35
35
  remote: resolvedRemote,
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/team/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,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AI,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;AAlBD,0BAkBC;AAEM,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,IAAA,2BAAqB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEjG,MAAM,IAAA,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,iBAAU,EAAC;QACf,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AAhBD,0BAgBC"}
@@ -31,9 +31,9 @@ function builder(yargs) {
31
31
  }
32
32
  exports.builder = builder;
33
33
  async function handler({ app, appId, clientCredentials, context, id, remote, user, }) {
34
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
35
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
36
- await team_1.deleteMember({
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)({
37
37
  id,
38
38
  appId: resolvedAppId,
39
39
  user,
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/team/member/delete.ts"],"names":[],"mappings":";;;AAEA,0CAAyD;AACzD,gEAA2D;AAC3D,4C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,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,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,mBAAY,EAAC;QACjB,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,IAAI;QACJ,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AAlBD,0BAkBC"}
@@ -31,9 +31,9 @@ function builder(yargs) {
31
31
  }
32
32
  exports.builder = builder;
33
33
  async function handler({ app, appId, clientCredentials, context, id, remote, user, }) {
34
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
35
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
36
- await team_1.inviteMember({
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.inviteMember)({
37
37
  id,
38
38
  appId: resolvedAppId,
39
39
  user,
@@ -1 +1 @@
1
- {"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../../src/commands/team/member/invite.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,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;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,yDAAyD;QACnE,YAAY,EAAE,IAAI;KACnB,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,2BAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE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G,MAAM,IAAA,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,mBAAY,EAAC;QACjB,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,IAAI;QACJ,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AAlBD,0BAkBC"}
@@ -37,9 +37,9 @@ function builder(yargs) {
37
37
  }
38
38
  exports.builder = builder;
39
39
  async function handler({ app, appId, clientCredentials, context, id, remote, role, user, }) {
40
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
41
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
42
- await team_1.updateMember({
40
+ const [resolvedAppId, resolvedRemote] = await (0, app_1.resolveAppIdAndRemote)(app, context, remote, appId);
41
+ await (0, authentication_1.authenticate)(resolvedRemote, 'teams:write', clientCredentials);
42
+ await (0, team_1.updateMember)({
43
43
  id,
44
44
  appId: resolvedAppId,
45
45
  user,
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/team/member/update.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAG5C,0CAAyD;AACzD,gEAA2D;AAC3D,4CAAiD;AAYpC,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,WAAW,GAAG,iCAAiC,CAAC;AAE7D,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,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;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,yDAAyD;QACnE,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,6BAA6B;QACvC,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAQ,CAAC;KACjC,CAAC,CAAC;AACP,CAAC;AA3BD,0BA2BC;AAEM,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,MAAM,EACN,IAAI,EACJ,IAAI,GACgB;IACpB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,2BAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEjG,MAAM,6BAAY,CAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,mBAAY,CAAC;QACjB,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,IAAI;QACJ,IAAI;QACJ,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AApBD,0BAoBC"}
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/team/member/update.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAG5C,0CAAyD;AACzD,gEAA2D;AAC3D,4CAAiD;AAYpC,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,WAAW,GAAG,iCAAiC,CAAC;AAE7D,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,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;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,yDAAyD;QACnE,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,6BAA6B;QACvC,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAQ,CAAC;KACjC,CAAC,CAAC;AACP,CAAC;AA3BD,0BA2BC;AAEM,KAAK,UAAU,OAAO,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,MAAM,EACN,IAAI,EACJ,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,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,mBAAY,EAAC;QACjB,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,IAAI;QACJ,IAAI;QACJ,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AApBD,0BAoBC"}
@@ -5,7 +5,7 @@ const node_utils_1 = require("@appsemble/node-utils");
5
5
  exports.command = 'member';
6
6
  exports.description = 'Commands related to app team members.';
7
7
  function builder(yargs) {
8
- return yargs.commandDir(...node_utils_1.commandDirOptions(__filename));
8
+ return yargs.commandDir(...(0, node_utils_1.commandDirOptions)(__filename));
9
9
  }
10
10
  exports.builder = builder;
11
11
  //# sourceMappingURL=member.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"member.js","sourceRoot":"","sources":["../../../src/commands/team/member.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAG7C,QAAA,OAAO,GAAG,QAAQ,CAAC;AACnB,QAAA,WAAW,GAAG,uCAAuC,CAAC;AAEnE,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,8BAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"member.js","sourceRoot":"","sources":["../../../src/commands/team/member.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAG7C,QAAA,OAAO,GAAG,QAAQ,CAAC;AACnB,QAAA,WAAW,GAAG,uCAAuC,CAAC;AAEnE,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,IAAA,8BAAiB,EAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,0BAEC"}
@@ -27,9 +27,9 @@ function builder(yargs) {
27
27
  }
28
28
  exports.builder = builder;
29
29
  async function handler({ annotation, app, appId, clientCredentials, context, id, name, remote, }) {
30
- const [resolvedAppId, resolvedRemote] = await app_1.resolveAppIdAndRemote(app, context, remote, appId);
31
- await authentication_1.authenticate(resolvedRemote, 'teams:write', clientCredentials);
32
- await team_1.updateTeam({
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.updateTeam)({
33
33
  id,
34
34
  appId: resolvedAppId,
35
35
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/team/update.ts"],"names":[],"mappings":";;;AAEA,uCAAsD;AACtD,6DAAwD;AACxD,yCAA4C;AAY/B,QAAA,OAAO,GAAG,QAAQ,CAAC;AACnB,QAAA,WAAW,GAAG,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QAAQ,EAAE,+BAA+B;QACzC,YAAY,EAAE,IAAI;KACnB,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,2BAA2B;KACtC,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,uDAAuD;KAClE,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,QAAQ,EAAE,4CAA4C;QACtD,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACP,CAAC;AAlBD,0BAkBC;AAEM,KAAK,UAAU,OAAO,CAAC,EAC5B,UAAU,EACV,GAAG,EACH,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,EAAE,EACF,IAAI,EACJ,MAAM,GACc;IACpB,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,IAAA,2BAAqB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEjG,MAAM,IAAA,6BAAY,EAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;IACrE,MAAM,IAAA,iBAAU,EAAC;QACf,EAAE;QACF,KAAK,EAAE,aAAa;QACpB,IAAI;QACJ,WAAW,EAAE,UAAU;QACvB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;AACL,CAAC;AApBD,0BAoBC"}
@@ -5,7 +5,7 @@ const node_utils_1 = require("@appsemble/node-utils");
5
5
  exports.command = 'team';
6
6
  exports.description = 'Commands related to app teams.';
7
7
  function builder(yargs) {
8
- return yargs.commandDir(...node_utils_1.commandDirOptions(__filename));
8
+ return yargs.commandDir(...(0, node_utils_1.commandDirOptions)(__filename));
9
9
  }
10
10
  exports.builder = builder;
11
11
  //# sourceMappingURL=team.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"team.js","sourceRoot":"","sources":["../../src/commands/team.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAG7C,QAAA,OAAO,GAAG,MAAM,CAAC;AACjB,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE5D,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,8BAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"team.js","sourceRoot":"","sources":["../../src/commands/team.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAG7C,QAAA,OAAO,GAAG,MAAM,CAAC;AACjB,QAAA,WAAW,GAAG,gCAAgC,CAAC;AAE5D,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,IAAA,8BAAiB,EAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,0BAEC"}
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ const authentication_1 = require("./lib/authentication");
13
13
  const coercers_1 = require("./lib/coercers");
14
14
  const initAxios_1 = require("./lib/initAxios");
15
15
  async function main(argv) {
16
- const explorer = cosmiconfig_1.cosmiconfig('appsembleServer');
16
+ const explorer = (0, cosmiconfig_1.cosmiconfig)('appsembleServer');
17
17
  const found = await explorer.search(process.cwd());
18
18
  let parser = yargs_1.default
19
19
  .option('verbose', {
@@ -35,8 +35,8 @@ async function main(argv) {
35
35
  description: `OAuth2 client credentials formatted as "client_id:client_secret". This may also be defined in the ${authentication_1.CREDENTIALS_ENV_VAR} environment variable.`,
36
36
  })
37
37
  .middleware([node_utils_1.configureLogger, initAxios_1.initAxios])
38
- .commandDir(path_1.join(__dirname, 'commands'), {
39
- extensions: [path_1.extname(__filename).slice(1)],
38
+ .commandDir((0, path_1.join)(__dirname, 'commands'), {
39
+ extensions: [(0, path_1.extname)(__filename).slice(1)],
40
40
  })
41
41
  .demandCommand(1)
42
42
  // .strict() isn’t used because of https://github.com/yargs/yargs/issues/2058
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index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,EAAE;QACvC,UAAU,EAAE,CAAC,IAAA,cAAO,EAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAC3C,CAAC;SACD,aAAa,CAAC,CAAC,CAAC;QACjB,6EAA6E;SAC5E,cAAc,EAAE;SAChB,IAAI,CAAC,wBAAW,CAAC;SACjB,IAAI,EAAE;SACN,UAAU,EAAE,CAAC;IAChB,IAAI,KAAK,EAAE;QACT,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KACtC;IACD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AArCD,oBAqCC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC3B,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC;IAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7B"}
package/dist/lib/app.js CHANGED
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.resolveAppIdAndRemote = exports.createApp = exports.updateApp = exports.writeAppMessages = exports.uploadMessages = exports.traverseAppDirectory = void 0;
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = require("path");
9
- const url_1 = require("url");
10
9
  const util_1 = require("util");
11
10
  const node_utils_1 = require("@appsemble/node-utils");
12
11
  const utils_1 = require("@appsemble/utils");
@@ -34,17 +33,17 @@ async function traverseAppDirectory(path, context, formData) {
34
33
  let maskableIconPath;
35
34
  let yaml;
36
35
  node_utils_1.logger.info(`Traversing directory for App files in ${path} 🕵`);
37
- await node_utils_1.opendirSafe(path, async (filepath, stat) => {
36
+ await (0, node_utils_1.opendirSafe)(path, async (filepath, stat) => {
38
37
  switch (stat.name.toLowerCase()) {
39
38
  case '.appsemblerc.yaml': {
40
39
  node_utils_1.logger.info(`Reading app settings from ${filepath}`);
41
- [rc] = await node_utils_1.readData(filepath);
40
+ [rc] = await (0, node_utils_1.readData)(filepath);
42
41
  if ('iconBackground' in rc) {
43
42
  formData.append('iconBackground', rc.iconBackground);
44
43
  }
45
- if (context && utils_1.has(rc === null || rc === void 0 ? void 0 : rc.context, context)) {
44
+ if (context && (0, utils_1.has)(rc === null || rc === void 0 ? void 0 : rc.context, context)) {
46
45
  discoveredContext = rc.context[context];
47
- node_utils_1.logger.verbose(`Using context: ${util_1.inspect(discoveredContext, { colors: true })}`);
46
+ node_utils_1.logger.verbose(`Using context: ${(0, util_1.inspect)(discoveredContext, { colors: true })}`);
48
47
  }
49
48
  break;
50
49
  }
@@ -53,7 +52,7 @@ async function traverseAppDirectory(path, context, formData) {
53
52
  if (yaml !== undefined) {
54
53
  throw new node_utils_1.AppsembleError('Found duplicate app definition');
55
54
  }
56
- const [, data] = await node_utils_1.readData(filepath);
55
+ const [, data] = await (0, node_utils_1.readData)(filepath);
57
56
  yaml = data;
58
57
  formData.append('yaml', data);
59
58
  return;
@@ -70,15 +69,15 @@ async function traverseAppDirectory(path, context, formData) {
70
69
  formData.append('longDescription', await fs_1.promises.readFile(filepath, 'utf8'));
71
70
  return;
72
71
  case 'screenshots':
73
- return node_utils_1.opendirSafe(filepath, (screenshotPath, screenshotStat) => {
72
+ return (0, node_utils_1.opendirSafe)(filepath, (screenshotPath, screenshotStat) => {
74
73
  node_utils_1.logger.info(`Adding screenshot ${screenshotPath} 🖼️`);
75
74
  if (!screenshotStat.isFile()) {
76
75
  throw new node_utils_1.AppsembleError(`Expected ${screenshotPath} to be an image file`);
77
76
  }
78
- formData.append('screenshots', fs_1.createReadStream(screenshotPath));
77
+ formData.append('screenshots', (0, fs_1.createReadStream)(screenshotPath));
79
78
  }, { allowMissing: true });
80
79
  case 'theme':
81
- return node_utils_1.opendirSafe(filepath, async (themeDir, themeStat) => {
80
+ return (0, node_utils_1.opendirSafe)(filepath, async (themeDir, themeStat) => {
82
81
  const name = themeStat.name.toLowerCase();
83
82
  if (name !== 'core' && name !== 'shared') {
84
83
  return;
@@ -86,7 +85,7 @@ async function traverseAppDirectory(path, context, formData) {
86
85
  if (!themeStat.isDirectory()) {
87
86
  throw new node_utils_1.AppsembleError(`Expected ${themeDir} to be a directory`);
88
87
  }
89
- const css = await processCss_1.processCss(path_1.join(themeDir, 'index.css'));
88
+ const css = await (0, processCss_1.processCss)((0, path_1.join)(themeDir, 'index.css'));
90
89
  formData.append(`${name}Style`, css);
91
90
  });
92
91
  default:
@@ -98,10 +97,10 @@ async function traverseAppDirectory(path, context, formData) {
98
97
  }
99
98
  discoveredContext || (discoveredContext = {});
100
99
  discoveredContext.icon = discoveredContext.icon
101
- ? path_1.resolve(path, discoveredContext.icon)
100
+ ? (0, path_1.resolve)(path, discoveredContext.icon)
102
101
  : iconPath;
103
102
  discoveredContext.maskableIcon = discoveredContext.maskableIcon
104
- ? path_1.resolve(path, discoveredContext.maskableIcon)
103
+ ? (0, path_1.resolve)(path, discoveredContext.maskableIcon)
105
104
  : maskableIconPath;
106
105
  return [discoveredContext, rc, yaml];
107
106
  }
@@ -117,13 +116,13 @@ exports.traverseAppDirectory = traverseAppDirectory;
117
116
  async function uploadMessages(path, appId, remote, force) {
118
117
  const result = [];
119
118
  node_utils_1.logger.info('Searching for translations 🕵');
120
- await node_utils_1.opendirSafe(path_1.join(path, 'i18n'), async (messageFile) => {
119
+ await (0, node_utils_1.opendirSafe)((0, path_1.join)(path, 'i18n'), async (messageFile) => {
121
120
  node_utils_1.logger.verbose(`Processing ${messageFile} ⚙️`);
122
- const { name: language } = path_1.parse(messageFile);
121
+ const { name: language } = (0, path_1.parse)(messageFile);
123
122
  if (result.some((entry) => entry.language === language)) {
124
123
  throw new node_utils_1.AppsembleError(`Found duplicate language “${language}”. Make sure each language only exists once in the directory.`);
125
124
  }
126
- const [messages] = await node_utils_1.readData(messageFile);
125
+ const [messages] = await (0, node_utils_1.readData)(messageFile);
127
126
  result.push({ force, language, messages });
128
127
  }, { allowMissing: true });
129
128
  if (!result.length) {
@@ -146,12 +145,12 @@ async function writeAppMessages(path, languages, verify, format) {
146
145
  var _a, _b;
147
146
  node_utils_1.logger.info(`Extracting messages from ${path}`);
148
147
  let app;
149
- let i18nDir = path_1.join(path, 'i18n');
148
+ let i18nDir = (0, path_1.join)(path, 'i18n');
150
149
  const messageFiles = new Set();
151
- await node_utils_1.opendirSafe(path, async (filepath, stat) => {
150
+ await (0, node_utils_1.opendirSafe)(path, async (filepath, stat) => {
152
151
  switch (stat.name.toLowerCase()) {
153
152
  case 'app-definition.yaml': {
154
- [app] = await node_utils_1.readData(filepath);
153
+ [app] = await (0, node_utils_1.readData)(filepath);
155
154
  break;
156
155
  }
157
156
  case 'i18n': {
@@ -159,7 +158,7 @@ async function writeAppMessages(path, languages, verify, format) {
159
158
  i18nDir = filepath;
160
159
  const i18nFiles = await fs_1.promises.readdir(filepath);
161
160
  for (const f of i18nFiles) {
162
- messageFiles.add(path_1.join(filepath, f));
161
+ messageFiles.add((0, path_1.join)(filepath, f));
163
162
  }
164
163
  break;
165
164
  }
@@ -173,13 +172,13 @@ async function writeAppMessages(path, languages, verify, format) {
173
172
  // Ensure the i18n directory exists.
174
173
  await fs_1.promises.mkdir(i18nDir, { recursive: true });
175
174
  for (const lang of [...languages, ...verify]) {
176
- messageFiles.add(path_1.join(i18nDir, `${lang}.${format}`));
175
+ messageFiles.add((0, path_1.join)(i18nDir, `${lang}.${format}`));
177
176
  }
178
- const defaultLangFile = path_1.join(i18nDir, `${app.defaultLanguage || 'en'}.${format}`);
177
+ const defaultLangFile = (0, path_1.join)(i18nDir, `${app.defaultLanguage || 'en'}.${format}`);
179
178
  messageFiles.add(defaultLangFile);
180
179
  const blockMessageKeys = {};
181
- const extractedMessages = utils_1.extractAppMessages(app, (block) => {
182
- const type = utils_1.normalizeBlockName(block.type);
180
+ const extractedMessages = (0, utils_1.extractAppMessages)(app, (block) => {
181
+ const type = (0, utils_1.normalizeBlockName)(block.type);
183
182
  if (blockMessageKeys[type]) {
184
183
  blockMessageKeys[type][block.version] = {};
185
184
  }
@@ -189,12 +188,12 @@ async function writeAppMessages(path, languages, verify, format) {
189
188
  };
190
189
  }
191
190
  });
192
- node_utils_1.logger.verbose(`Found message IDs: ${util_1.inspect(extractedMessages)}`);
191
+ node_utils_1.logger.verbose(`Found message IDs: ${(0, util_1.inspect)(extractedMessages)}`);
193
192
  for (const filepath of messageFiles) {
194
193
  node_utils_1.logger.info(`Processing ${filepath}`);
195
194
  let oldMessages;
196
- if (fs_1.existsSync(filepath)) {
197
- [oldMessages] = await node_utils_1.readData(filepath);
195
+ if ((0, fs_1.existsSync)(filepath)) {
196
+ [oldMessages] = await (0, node_utils_1.readData)(filepath);
198
197
  }
199
198
  else if (verify) {
200
199
  throw new node_utils_1.AppsembleError(`Missing translations file: ${filepath}`);
@@ -207,19 +206,19 @@ async function writeAppMessages(path, languages, verify, format) {
207
206
  };
208
207
  }
209
208
  const newMessageIds = Object.fromEntries(Object.keys(extractedMessages.messageIds).map((key) => {
210
- if (utils_1.has(oldMessages.messageIds, key) && oldMessages.messageIds[key]) {
209
+ if ((0, utils_1.has)(oldMessages.messageIds, key) && oldMessages.messageIds[key]) {
211
210
  if (typeof oldMessages.messageIds[key] !== 'string') {
212
211
  throw new node_utils_1.AppsembleError(`Invalid translation key: messageIds.${key}`);
213
212
  }
214
213
  return [key, oldMessages.messageIds[key]];
215
214
  }
216
- if (verify.includes(path_1.parse(filepath).name)) {
215
+ if (verify.includes((0, path_1.parse)(filepath).name)) {
217
216
  throw new node_utils_1.AppsembleError(`Missing translation: messageIds.${key}`);
218
217
  }
219
218
  return [key, ''];
220
219
  }));
221
220
  const newAppMessages = Object.fromEntries(Object.keys(extractedMessages.app).map((key) => {
222
- if (utils_1.has(oldMessages.app, key) && oldMessages.app[key]) {
221
+ if ((0, utils_1.has)(oldMessages.app, key) && oldMessages.app[key]) {
223
222
  if (typeof oldMessages.app[key] !== 'string') {
224
223
  throw new node_utils_1.AppsembleError(`Invalid translation key: app.${key}`);
225
224
  }
@@ -228,7 +227,7 @@ async function writeAppMessages(path, languages, verify, format) {
228
227
  if (filepath === defaultLangFile) {
229
228
  return [key, extractedMessages.app[key]];
230
229
  }
231
- if (verify.includes(path_1.parse(filepath).name)) {
230
+ if (verify.includes((0, path_1.parse)(filepath).name)) {
232
231
  throw new node_utils_1.AppsembleError(`Missing translation: app.${key}`);
233
232
  }
234
233
  return [key, ''];
@@ -252,7 +251,7 @@ async function writeAppMessages(path, languages, verify, format) {
252
251
  const blockMessages = {};
253
252
  if (oldMessages.blocks) {
254
253
  for (const key of Object.keys(oldMessages.blocks)) {
255
- if (!utils_1.has(blockMessageKeys, key)) {
254
+ if (!(0, utils_1.has)(blockMessageKeys, key)) {
256
255
  throw new node_utils_1.AppsembleError(`Invalid translation key: blocks.${key}\nThis block is not used in the app`);
257
256
  }
258
257
  }
@@ -261,7 +260,7 @@ async function writeAppMessages(path, languages, verify, format) {
261
260
  if ((_b = oldMessages.blocks) === null || _b === void 0 ? void 0 : _b[blockName]) {
262
261
  blockMessages[blockName] = {};
263
262
  for (const [version, oldValues] of Object.entries(oldMessages.blocks[blockName])) {
264
- if (!utils_1.has(blockMessageKeys[blockName], version)) {
263
+ if (!(0, utils_1.has)(blockMessageKeys[blockName], version)) {
265
264
  throw new node_utils_1.AppsembleError(`Invalid translation key: blocks.${blockName}.${version}
266
265
  This block version is not used in the app`);
267
266
  }
@@ -269,7 +268,7 @@ This block version is not used in the app`);
269
268
  if (typeof oldValue !== 'string') {
270
269
  throw new node_utils_1.AppsembleError(`Invalid translation key: blocks.${blockName}.${version}.${oldValueKey}`);
271
270
  }
272
- if (verify.includes(path_1.parse(filepath).name) && !oldValue) {
271
+ if (verify.includes((0, path_1.parse)(filepath).name) && !oldValue) {
273
272
  throw new node_utils_1.AppsembleError(`Missing translation: blocks.${blockName}.${version}.${oldValueKey}`);
274
273
  }
275
274
  }
@@ -283,7 +282,7 @@ This block version is not used in the app`);
283
282
  ...(Object.keys(blockMessages).length && { blocks: blockMessages }),
284
283
  ...(Object.keys(coreMessages).length && { core: coreMessages }),
285
284
  };
286
- await node_utils_1.writeData(filepath, result);
285
+ await (0, node_utils_1.writeData)(filepath, result);
287
286
  }
288
287
  }
289
288
  exports.writeAppMessages = writeAppMessages;
@@ -298,7 +297,7 @@ async function updateApp({ clientCredentials, context, force, path, ...options }
298
297
  const formData = new form_data_1.default();
299
298
  let appsembleContext;
300
299
  if (file.isFile()) {
301
- const [, data] = await node_utils_1.readData(path);
300
+ const [, data] = await (0, node_utils_1.readData)(path);
302
301
  formData.append('yaml', data);
303
302
  }
304
303
  else {
@@ -316,10 +315,10 @@ async function updateApp({ clientCredentials, context, force, path, ...options }
316
315
  const googleAnalyticsId = (_l = appsembleContext.googleAnalyticsId) !== null && _l !== void 0 ? _l : options.googleAnalyticsId;
317
316
  node_utils_1.logger.info(`App id: ${id}`);
318
317
  node_utils_1.logger.verbose(`App remote: ${remote}`);
319
- node_utils_1.logger.verbose(`App is template: ${util_1.inspect(template, { colors: true })}`);
318
+ node_utils_1.logger.verbose(`App is template: ${(0, util_1.inspect)(template, { colors: true })}`);
320
319
  node_utils_1.logger.verbose(`App visibility: ${visibility}`);
321
320
  node_utils_1.logger.verbose(`Icon background: ${iconBackground}`);
322
- node_utils_1.logger.verbose(`Force update: ${util_1.inspect(force, { colors: true })}`);
321
+ node_utils_1.logger.verbose(`Force update: ${(0, util_1.inspect)(force, { colors: true })}`);
323
322
  if (!id) {
324
323
  throw new node_utils_1.AppsembleError('The app id must be passed as a command line flag or in the context');
325
324
  }
@@ -328,12 +327,12 @@ async function updateApp({ clientCredentials, context, force, path, ...options }
328
327
  formData.append('visibility', visibility);
329
328
  formData.append('iconBackground', iconBackground);
330
329
  if (icon) {
331
- const realIcon = typeof icon === 'string' ? fs_1.createReadStream(icon) : icon;
330
+ const realIcon = typeof icon === 'string' ? (0, fs_1.createReadStream)(icon) : icon;
332
331
  node_utils_1.logger.info(`Using icon from ${(_m = realIcon.path) !== null && _m !== void 0 ? _m : 'stdin'}`);
333
332
  formData.append('icon', realIcon);
334
333
  }
335
334
  if (maskableIcon) {
336
- const realIcon = typeof maskableIcon === 'string' ? fs_1.createReadStream(maskableIcon) : maskableIcon;
335
+ const realIcon = typeof maskableIcon === 'string' ? (0, fs_1.createReadStream)(maskableIcon) : maskableIcon;
337
336
  node_utils_1.logger.info(`Using maskable icon from ${(_o = realIcon.path) !== null && _o !== void 0 ? _o : 'stdin'}`);
338
337
  formData.append('maskableIcon', realIcon);
339
338
  }
@@ -348,17 +347,17 @@ async function updateApp({ clientCredentials, context, force, path, ...options }
348
347
  node_utils_1.logger.info('Using Google Analytics');
349
348
  formData.append('googleAnalyticsID', googleAnalyticsId);
350
349
  }
351
- await authentication_1.authenticate(remote, 'apps:write', clientCredentials);
350
+ await (0, authentication_1.authenticate)(remote, 'apps:write', clientCredentials);
352
351
  const { data } = await axios_1.default.patch(`/api/apps/${id}`, formData, { baseURL: remote });
353
352
  if (file.isDirectory()) {
354
353
  // After uploading the app, upload block styles and messages if they are available
355
- await block_1.traverseBlockThemes(path, data.id, remote, force);
354
+ await (0, block_1.traverseBlockThemes)(path, data.id, remote, force);
356
355
  await uploadMessages(path, data.id, remote, force);
357
356
  }
358
- const { host, protocol } = new url_1.URL(remote);
357
+ const { host, protocol } = new URL(remote);
359
358
  node_utils_1.logger.info(`Successfully updated app ${data.definition.name}! 🙌`);
360
359
  node_utils_1.logger.info(`App URL: ${protocol}//${data.path}.${data.OrganizationId}.${host}`);
361
- node_utils_1.logger.info(`App store page: ${new url_1.URL(`/apps/${data.id}`, remote)}`);
360
+ node_utils_1.logger.info(`App store page: ${new URL(`/apps/${data.id}`, remote)}`);
362
361
  }
363
362
  exports.updateApp = updateApp;
364
363
  /**
@@ -373,16 +372,16 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
373
372
  let appsembleContext;
374
373
  let rc;
375
374
  let yaml;
376
- let filename = path_1.relative(process.cwd(), path);
375
+ let filename = (0, path_1.relative)(process.cwd(), path);
377
376
  if (file.isFile()) {
378
377
  // Assuming file is App YAML
379
- const [, data] = await node_utils_1.readData(path);
378
+ const [, data] = await (0, node_utils_1.readData)(path);
380
379
  yaml = data;
381
380
  formData.append('yaml', data);
382
381
  }
383
382
  else {
384
383
  [appsembleContext, rc, yaml] = await traverseAppDirectory(path, context, formData);
385
- filename = path_1.join(filename, 'app-definition.yaml');
384
+ filename = (0, path_1.join)(filename, 'app-definition.yaml');
386
385
  }
387
386
  const remote = (_a = appsembleContext.remote) !== null && _a !== void 0 ? _a : options.remote;
388
387
  const organizationId = (_b = appsembleContext.organization) !== null && _b !== void 0 ? _b : options.organization;
@@ -396,7 +395,7 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
396
395
  const googleAnalyticsId = (_l = appsembleContext.googleAnalyticsId) !== null && _l !== void 0 ? _l : options.googleAnalyticsId;
397
396
  node_utils_1.logger.verbose(`App remote: ${remote}`);
398
397
  node_utils_1.logger.verbose(`App organzation: ${organizationId}`);
399
- node_utils_1.logger.verbose(`App is template: ${util_1.inspect(template, { colors: true })}`);
398
+ node_utils_1.logger.verbose(`App is template: ${(0, util_1.inspect)(template, { colors: true })}`);
400
399
  node_utils_1.logger.verbose(`App visibility: ${visibility}`);
401
400
  node_utils_1.logger.verbose(`Icon background: ${iconBackground}`);
402
401
  if (!organizationId) {
@@ -407,12 +406,12 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
407
406
  formData.append('visibility', visibility);
408
407
  formData.append('iconBackground', iconBackground);
409
408
  if (icon) {
410
- const realIcon = typeof icon === 'string' ? fs_1.createReadStream(icon) : icon;
409
+ const realIcon = typeof icon === 'string' ? (0, fs_1.createReadStream)(icon) : icon;
411
410
  node_utils_1.logger.info(`Using icon from ${(_m = realIcon.path) !== null && _m !== void 0 ? _m : 'stdin'}`);
412
411
  formData.append('icon', realIcon);
413
412
  }
414
413
  if (maskableIcon) {
415
- const realIcon = typeof maskableIcon === 'string' ? fs_1.createReadStream(maskableIcon) : maskableIcon;
414
+ const realIcon = typeof maskableIcon === 'string' ? (0, fs_1.createReadStream)(maskableIcon) : maskableIcon;
416
415
  node_utils_1.logger.info(`Using maskable icon from ${(_o = realIcon.path) !== null && _o !== void 0 ? _o : 'stdin'}`);
417
416
  formData.append('maskableIcon', realIcon);
418
417
  }
@@ -427,7 +426,7 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
427
426
  node_utils_1.logger.info('Using Google Analytics');
428
427
  formData.append('googleAnalyticsID', googleAnalyticsId);
429
428
  }
430
- await authentication_1.authenticate(remote, resources ? 'apps:write resources:write' : 'apps:write', clientCredentials);
429
+ await (0, authentication_1.authenticate)(remote, resources ? 'apps:write resources:write' : 'apps:write', clientCredentials);
431
430
  let data;
432
431
  try {
433
432
  ({ data } = await axios_1.default.post('/api/apps', formData, {
@@ -442,7 +441,7 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
442
441
  if (((_q = (_p = error.response) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.message) !== 'App validation failed') {
443
442
  throw error;
444
443
  }
445
- throw new node_utils_1.AppsembleError(output_1.printAxiosError(filename, yaml, error.response.data.data.errors));
444
+ throw new node_utils_1.AppsembleError((0, output_1.printAxiosError)(filename, yaml, error.response.data.data.errors));
446
445
  }
447
446
  if (dryRun) {
448
447
  node_utils_1.logger.info('Skipped uploading block themes and app messages.');
@@ -451,30 +450,30 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
451
450
  }
452
451
  if (file.isDirectory() && !dryRun) {
453
452
  // After uploading the app, upload block styles and messages if they are available
454
- await block_1.traverseBlockThemes(path, data.id, remote, false);
453
+ await (0, block_1.traverseBlockThemes)(path, data.id, remote, false);
455
454
  await uploadMessages(path, data.id, remote, false);
456
- if (resources && fs_1.existsSync(path_1.join(path, 'resources'))) {
457
- const resourcePath = path_1.join(path, 'resources');
455
+ if (resources && (0, fs_1.existsSync)((0, path_1.join)(path, 'resources'))) {
456
+ const resourcePath = (0, path_1.join)(path, 'resources');
458
457
  try {
459
458
  const resourceFiles = await fs_1.promises.readdir(resourcePath, { withFileTypes: true });
460
459
  for (const resource of resourceFiles) {
461
460
  if (resource.isFile()) {
462
- const { name } = path_1.parse(resource.name);
463
- await resource_1.createResource({
461
+ const { name } = (0, path_1.parse)(resource.name);
462
+ await (0, resource_1.createResource)({
464
463
  appId: data.id,
465
- path: path_1.join(resourcePath, resource.name),
464
+ path: (0, path_1.join)(resourcePath, resource.name),
466
465
  remote,
467
466
  resourceName: name,
468
467
  });
469
468
  }
470
469
  else if (resource.isDirectory()) {
471
- const subDirectoryResources = await fs_extra_1.readdir(path_1.join(resourcePath, resource.name), {
470
+ const subDirectoryResources = await (0, fs_extra_1.readdir)((0, path_1.join)(resourcePath, resource.name), {
472
471
  withFileTypes: true,
473
472
  });
474
473
  for (const subResource of subDirectoryResources.filter((s) => s.isFile())) {
475
- await resource_1.createResource({
474
+ await (0, resource_1.createResource)({
476
475
  appId: data.id,
477
- path: path_1.join(resourcePath, resource.name, subResource.name),
476
+ path: (0, path_1.join)(resourcePath, resource.name, subResource.name),
478
477
  remote,
479
478
  resourceName: resource.name,
480
479
  });
@@ -490,13 +489,13 @@ async function createApp({ clientCredentials, context, dryRun, modifyContext, pa
490
489
  }
491
490
  if (modifyContext && appsembleContext && context && !dryRun) {
492
491
  rc.context[context].id = data.id;
493
- await node_utils_1.writeData(path_1.join(path, '.appsemblerc.yaml'), rc);
492
+ await (0, node_utils_1.writeData)((0, path_1.join)(path, '.appsemblerc.yaml'), rc);
494
493
  node_utils_1.logger.info(`Updated .appsemblerc: Set context.${context}.id to ${data.id}`);
495
494
  }
496
- const { host, protocol } = new url_1.URL(remote);
495
+ const { host, protocol } = new URL(remote);
497
496
  node_utils_1.logger.info(`Successfully created app ${data.definition.name}! 🙌`);
498
497
  node_utils_1.logger.info(`App URL: ${protocol}//${data.path}.${data.OrganizationId}.${host}`);
499
- node_utils_1.logger.info(`App store page: ${new url_1.URL(`/apps/${data.id}`, remote)}`);
498
+ node_utils_1.logger.info(`App store page: ${new URL(`/apps/${data.id}`, remote)}`);
500
499
  }
501
500
  exports.createApp = createApp;
502
501
  /**
@@ -513,8 +512,8 @@ async function resolveAppIdAndRemote(appPath, name, defaultRemote, defaultAppId)
513
512
  let id = defaultAppId;
514
513
  let resolvedRemote = defaultRemote;
515
514
  if (appPath) {
516
- const rcPath = path_1.join(appPath, '.appsemblerc.yaml');
517
- const [rc] = await node_utils_1.readData(rcPath);
515
+ const rcPath = (0, path_1.join)(appPath, '.appsemblerc.yaml');
516
+ const [rc] = await (0, node_utils_1.readData)(rcPath);
518
517
  const context = (_a = rc.context) === null || _a === void 0 ? void 0 : _a[name];
519
518
  if (!defaultAppId) {
520
519
  id = context === null || context === void 0 ? void 0 : context.id;
@@ -526,7 +525,7 @@ async function resolveAppIdAndRemote(appPath, name, defaultRemote, defaultAppId)
526
525
  if (id == null) {
527
526
  throw new node_utils_1.AppsembleError(`App ID was not found in context.${name}.id nor in --app-id`);
528
527
  }
529
- return [id, coercers_1.coerceRemote(resolvedRemote)];
528
+ return [id, (0, coercers_1.coerceRemote)(resolvedRemote)];
530
529
  }
531
530
  exports.resolveAppIdAndRemote = resolveAppIdAndRemote;
532
531
  //# sourceMappingURL=app.js.map