@forge/cli-shared 10.0.0-next.13 → 10.0.0-next.15

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 (227) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/out/app-logs/graphql-client.d.ts +2 -2
  3. package/out/app-logs/graphql-client.d.ts.map +1 -1
  4. package/out/app-logs/graphql-client.js +9 -17
  5. package/out/app-logs/index.d.ts +2 -2
  6. package/out/app-logs/index.d.ts.map +1 -1
  7. package/out/app-logs/index.js +2 -5
  8. package/out/app-logs/view-logs.d.ts +4 -4
  9. package/out/app-logs/view-logs.d.ts.map +1 -1
  10. package/out/app-logs/view-logs.js +8 -12
  11. package/out/apps/app-config.d.ts +2 -2
  12. package/out/apps/app-config.d.ts.map +1 -1
  13. package/out/apps/app-config.js +13 -20
  14. package/out/apps/create-an-app.d.ts +4 -4
  15. package/out/apps/create-an-app.d.ts.map +1 -1
  16. package/out/apps/create-an-app.js +6 -11
  17. package/out/apps/create-app-graphql-client.d.ts +2 -2
  18. package/out/apps/create-app-graphql-client.d.ts.map +1 -1
  19. package/out/apps/create-app-graphql-client.js +9 -14
  20. package/out/apps/get-app-owner.d.ts +4 -4
  21. package/out/apps/get-app-owner.d.ts.map +1 -1
  22. package/out/apps/get-app-owner.js +8 -13
  23. package/out/apps/index.d.ts +9 -9
  24. package/out/apps/index.d.ts.map +1 -1
  25. package/out/apps/index.js +9 -12
  26. package/out/apps/package-installer.d.ts +1 -1
  27. package/out/apps/package-installer.d.ts.map +1 -1
  28. package/out/apps/package-installer.js +9 -14
  29. package/out/apps/register-app.d.ts +4 -4
  30. package/out/apps/register-app.d.ts.map +1 -1
  31. package/out/apps/register-app.js +9 -13
  32. package/out/apps/sites.js +1 -4
  33. package/out/apps/template-module.js +27 -33
  34. package/out/apps/template.d.ts +3 -3
  35. package/out/apps/template.d.ts.map +1 -1
  36. package/out/apps/template.js +36 -47
  37. package/out/ari/ari.js +48 -63
  38. package/out/ari/index.d.ts +1 -1
  39. package/out/ari/index.d.ts.map +1 -1
  40. package/out/ari/index.js +1 -4
  41. package/out/auth/authenticator.js +2 -6
  42. package/out/auth/index.d.ts +3 -3
  43. package/out/auth/index.d.ts.map +1 -1
  44. package/out/auth/index.js +3 -6
  45. package/out/auth/instruction.js +3 -6
  46. package/out/auth/personal/credential-store.d.ts +2 -2
  47. package/out/auth/personal/credential-store.d.ts.map +1 -1
  48. package/out/auth/personal/credential-store.js +48 -57
  49. package/out/auth/personal/index.d.ts +6 -6
  50. package/out/auth/personal/index.d.ts.map +1 -1
  51. package/out/auth/personal/index.js +6 -9
  52. package/out/auth/personal/login.d.ts +3 -3
  53. package/out/auth/personal/login.d.ts.map +1 -1
  54. package/out/auth/personal/login.js +1 -5
  55. package/out/auth/personal/logout.d.ts +1 -1
  56. package/out/auth/personal/logout.d.ts.map +1 -1
  57. package/out/auth/personal/logout.js +1 -5
  58. package/out/auth/personal/me-graphql-client.d.ts +3 -3
  59. package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
  60. package/out/auth/personal/me-graphql-client.js +7 -12
  61. package/out/auth/personal/token-authenticator.d.ts +3 -3
  62. package/out/auth/personal/token-authenticator.d.ts.map +1 -1
  63. package/out/auth/personal/token-authenticator.js +10 -14
  64. package/out/auth/personal/user-repository.d.ts +4 -4
  65. package/out/auth/personal/user-repository.d.ts.map +1 -1
  66. package/out/auth/personal/user-repository.js +5 -9
  67. package/out/cache/cached-conf.d.ts.map +1 -1
  68. package/out/cache/cached-conf.js +5 -10
  69. package/out/cache/index.d.ts +1 -1
  70. package/out/cache/index.d.ts.map +1 -1
  71. package/out/cache/index.js +1 -4
  72. package/out/config/config-codec-types.js +1 -2
  73. package/out/config/config-file-section-reader.d.ts +3 -3
  74. package/out/config/config-file-section-reader.d.ts.map +1 -1
  75. package/out/config/config-file-section-reader.js +4 -10
  76. package/out/config/config-file-section-writer.d.ts +3 -3
  77. package/out/config/config-file-section-writer.d.ts.map +1 -1
  78. package/out/config/config-file-section-writer.js +2 -7
  79. package/out/config/config-file.d.ts +3 -3
  80. package/out/config/config-file.d.ts.map +1 -1
  81. package/out/config/config-file.js +40 -49
  82. package/out/config/config-section.js +4 -11
  83. package/out/config/config.d.ts +1 -1
  84. package/out/config/config.d.ts.map +1 -1
  85. package/out/config/config.js +7 -13
  86. package/out/config/index.d.ts +6 -6
  87. package/out/config/index.d.ts.map +1 -1
  88. package/out/config/index.js +6 -9
  89. package/out/file-system/archiver.d.ts +2 -2
  90. package/out/file-system/archiver.d.ts.map +1 -1
  91. package/out/file-system/archiver.js +20 -29
  92. package/out/file-system/file-system-reader.d.ts.map +1 -1
  93. package/out/file-system/file-system-reader.js +21 -26
  94. package/out/file-system/file-system-writer.js +5 -10
  95. package/out/file-system/index.d.ts +5 -5
  96. package/out/file-system/index.d.ts.map +1 -1
  97. package/out/file-system/index.js +5 -8
  98. package/out/file-system/util.js +1 -4
  99. package/out/file-system/zip-accessor.js +3 -8
  100. package/out/graphql/app-environment-graphql-client.d.ts +2 -2
  101. package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
  102. package/out/graphql/app-environment-graphql-client.js +10 -16
  103. package/out/graphql/app-oauth-client-id-graphql-client.d.ts +1 -1
  104. package/out/graphql/app-oauth-client-id-graphql-client.d.ts.map +1 -1
  105. package/out/graphql/app-oauth-client-id-graphql-client.js +6 -10
  106. package/out/graphql/debugging-graphql-runner.d.ts +2 -2
  107. package/out/graphql/debugging-graphql-runner.d.ts.map +1 -1
  108. package/out/graphql/debugging-graphql-runner.js +5 -10
  109. package/out/graphql/gateway.js +15 -23
  110. package/out/graphql/get-mutation-error.js +4 -8
  111. package/out/graphql/gql/gql.d.ts +82 -82
  112. package/out/graphql/gql/gql.d.ts.map +1 -1
  113. package/out/graphql/gql/gql.js +2 -6
  114. package/out/graphql/gql/graphql.d.ts +214 -12
  115. package/out/graphql/gql/graphql.d.ts.map +1 -1
  116. package/out/graphql/gql/graphql.js +83 -88
  117. package/out/graphql/gql/index.d.ts +1 -1
  118. package/out/graphql/gql/index.d.ts.map +1 -1
  119. package/out/graphql/gql/index.js +1 -4
  120. package/out/graphql/graphql-client.js +1 -2
  121. package/out/graphql/graphql-domain-types.d.ts +1 -1
  122. package/out/graphql/graphql-domain-types.d.ts.map +1 -1
  123. package/out/graphql/graphql-domain-types.js +1 -2
  124. package/out/graphql/graphql-runtime-enums.js +16 -19
  125. package/out/graphql/index.d.ts +12 -12
  126. package/out/graphql/index.d.ts.map +1 -1
  127. package/out/graphql/index.js +12 -17
  128. package/out/graphql/minimal-graphql-runner.d.ts +4 -4
  129. package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
  130. package/out/graphql/minimal-graphql-runner.js +31 -40
  131. package/out/graphql/mutation-aware-graphql-client.d.ts +2 -2
  132. package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
  133. package/out/graphql/mutation-aware-graphql-client.js +4 -10
  134. package/out/graphql/path-based-graphql-client-resolver.d.ts +1 -1
  135. package/out/graphql/path-based-graphql-client-resolver.d.ts.map +1 -1
  136. package/out/graphql/path-based-graphql-client-resolver.js +3 -7
  137. package/out/http-client/feedback-post-client.js +1 -5
  138. package/out/http-client/file-uploader.d.ts +1 -1
  139. package/out/http-client/file-uploader.d.ts.map +1 -1
  140. package/out/http-client/file-uploader.js +11 -18
  141. package/out/http-client/global-edge-http-client.js +8 -14
  142. package/out/http-client/index.d.ts +5 -5
  143. package/out/http-client/index.d.ts.map +1 -1
  144. package/out/http-client/index.js +5 -8
  145. package/out/http-client/node-request.js +10 -16
  146. package/out/http-client/trace.js +1 -4
  147. package/out/index.d.ts +13 -13
  148. package/out/index.d.ts.map +1 -1
  149. package/out/index.js +13 -16
  150. package/out/service/bridge-script-service.js +5 -9
  151. package/out/service/i18n-resource-bundling-service.js +24 -30
  152. package/out/service/iframe-resizer-script-service.js +5 -9
  153. package/out/service/index.d.ts +5 -5
  154. package/out/service/index.d.ts.map +1 -1
  155. package/out/service/index.js +5 -8
  156. package/out/service/statsig-service.d.ts +1 -1
  157. package/out/service/statsig-service.d.ts.map +1 -1
  158. package/out/service/statsig-service.js +9 -15
  159. package/out/service/supported-products-service.d.ts +2 -2
  160. package/out/service/supported-products-service.d.ts.map +1 -1
  161. package/out/service/supported-products-service.js +13 -18
  162. package/out/shared/assertUnreachable.js +1 -4
  163. package/out/shared/assistant-cli.d.ts +1 -1
  164. package/out/shared/assistant-cli.d.ts.map +1 -1
  165. package/out/shared/assistant-cli.js +15 -24
  166. package/out/shared/cli-details.js +6 -11
  167. package/out/shared/developer-console.js +12 -18
  168. package/out/shared/directories.js +4 -8
  169. package/out/shared/environment.d.ts +1 -1
  170. package/out/shared/environment.d.ts.map +1 -1
  171. package/out/shared/environment.js +19 -25
  172. package/out/shared/error-handling.d.ts +1 -1
  173. package/out/shared/error-handling.d.ts.map +1 -1
  174. package/out/shared/error-handling.js +24 -44
  175. package/out/shared/forge-cli-attribution.js +6 -11
  176. package/out/shared/index.d.ts +13 -13
  177. package/out/shared/index.d.ts.map +1 -1
  178. package/out/shared/index.js +13 -16
  179. package/out/shared/installations.js +1 -4
  180. package/out/shared/pause.js +1 -5
  181. package/out/shared/product.d.ts.map +1 -1
  182. package/out/shared/product.js +5 -10
  183. package/out/shared/read-app-config-files.d.ts +1 -1
  184. package/out/shared/read-app-config-files.d.ts.map +1 -1
  185. package/out/shared/read-app-config-files.js +6 -12
  186. package/out/shared/runner-signals.js +1 -5
  187. package/out/shared/test.d.ts +1 -1
  188. package/out/shared/test.d.ts.map +1 -1
  189. package/out/shared/test.js +24 -29
  190. package/out/tunnel/docker-compose-lifecycle.d.ts +3 -3
  191. package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
  192. package/out/tunnel/docker-compose-lifecycle.js +53 -70
  193. package/out/tunnel/index.d.ts +2 -2
  194. package/out/tunnel/index.d.ts.map +1 -1
  195. package/out/tunnel/index.js +2 -5
  196. package/out/tunnel/tunnel-options.js +13 -18
  197. package/out/ui/command-line-ui.d.ts +2 -2
  198. package/out/ui/command-line-ui.d.ts.map +1 -1
  199. package/out/ui/command-line-ui.js +53 -58
  200. package/out/ui/hint-rotation.d.ts +2 -2
  201. package/out/ui/hint-rotation.d.ts.map +1 -1
  202. package/out/ui/hint-rotation.js +2 -6
  203. package/out/ui/index.d.ts +8 -8
  204. package/out/ui/index.d.ts.map +1 -1
  205. package/out/ui/index.js +8 -11
  206. package/out/ui/log-color.js +16 -20
  207. package/out/ui/log-symbols.js +10 -13
  208. package/out/ui/logger.js +2 -6
  209. package/out/ui/multiple-table-prompt.d.ts +1 -1
  210. package/out/ui/multiple-table-prompt.d.ts.map +1 -1
  211. package/out/ui/multiple-table-prompt.js +13 -20
  212. package/out/ui/runtime-log.js +12 -16
  213. package/out/ui/single-table-prompt.d.ts +1 -1
  214. package/out/ui/single-table-prompt.d.ts.map +1 -1
  215. package/out/ui/single-table-prompt.js +12 -19
  216. package/out/ui/table-prompt.d.ts +1 -1
  217. package/out/ui/table-prompt.d.ts.map +1 -1
  218. package/out/ui/table-prompt.js +11 -16
  219. package/out/ui/table.d.ts.map +1 -1
  220. package/out/ui/table.js +4 -7
  221. package/out/ui/text.d.ts +1 -1
  222. package/out/ui/text.d.ts.map +1 -1
  223. package/out/ui/text.js +208 -214
  224. package/out/ui/ui.d.ts +2 -2
  225. package/out/ui/ui.d.ts.map +1 -1
  226. package/out/ui/ui.js +1 -2
  227. package/package.json +3 -2
@@ -1,6 +1,6 @@
1
- import { ConfigWriter } from './';
2
- import { Codec, CodecType, InnerType } from './config-codec-types';
3
- import { ConfigSectionWriter } from './config-section';
1
+ import { ConfigWriter } from './index.js';
2
+ import { Codec, CodecType, InnerType } from './config-codec-types.js';
3
+ import { ConfigSectionWriter } from './config-section.js';
4
4
  export declare class ConfigFileSectionWriter<K extends string, V extends object> implements ConfigSectionWriter<V> {
5
5
  private readonly key;
6
6
  private readonly configWriter;
@@ -1 +1 @@
1
- {"version":3,"file":"config-file-section-writer.d.ts","sourceRoot":"","sources":["../../src/config/config-file-section-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,qBAAa,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAE,YAAW,mBAAmB,CAAC,CAAC,CAAC;IAEtG,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,YAAY;IAGhC,kBAAkB,CAAC,aAAa,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlE;AAED,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,KAAK,EAC1E,KAAK,CAAC,EACN,QAAQ,SAAS,CAAC,CAAC,CAAC,EACpB,cAAc,YAAY,KACzB,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAElC,CAAC"}
1
+ {"version":3,"file":"config-file-section-writer.d.ts","sourceRoot":"","sources":["../../src/config/config-file-section-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,qBAAa,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAE,YAAW,mBAAmB,CAAC,CAAC,CAAC;IAEtG,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,YAAY;IAGhC,kBAAkB,CAAC,aAAa,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlE;AAED,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,KAAK,EAC1E,KAAK,CAAC,EACN,QAAQ,SAAS,CAAC,CAAC,CAAC,EACpB,cAAc,YAAY,KACzB,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAElC,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configFileWriterForSection = exports.ConfigFileSectionWriter = void 0;
4
- class ConfigFileSectionWriter {
1
+ export class ConfigFileSectionWriter {
5
2
  key;
6
3
  configWriter;
7
4
  constructor(key, configWriter) {
@@ -15,8 +12,6 @@ class ConfigFileSectionWriter {
15
12
  await this.configWriter.prependAppNameToModules(name);
16
13
  }
17
14
  }
18
- exports.ConfigFileSectionWriter = ConfigFileSectionWriter;
19
- const configFileWriterForSection = (key, schema, configWriter) => {
15
+ export const configFileWriterForSection = (key, schema, configWriter) => {
20
16
  return new ConfigFileSectionWriter(key, configWriter);
21
17
  };
22
- exports.configFileWriterForSection = configFileWriterForSection;
@@ -1,7 +1,7 @@
1
- import { FileSystemReader, FileSystemWriter } from '../file-system';
2
- import { ConfigReader, ConfigWriter } from './';
1
+ import { FileSystemReader, FileSystemWriter } from '../file-system/index.js';
2
+ import { ConfigReader, ConfigWriter } from './index.js';
3
3
  import { Modules, ManifestSchema, Resources } from '@forge/manifest';
4
- import { UserError, ValidationError } from '../shared';
4
+ import { UserError, ValidationError } from '../shared/index.js';
5
5
  export declare class InvalidManifestError extends ValidationError {
6
6
  constructor();
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config-file.d.ts","sourceRoot":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I,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajE,OAAO,CAAC,aAAa;IAIR,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1G,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,wBAAwB;IAkBhC,OAAO,CAAC,6BAA6B;IAkBrC,OAAO,CAAC,gBAAgB;IAIX,oBAAoB,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;IAqClF,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAe1E,YAAY,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAsB1E,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKzD,OAAO,CAAC,eAAe;CAkCxB"}
@@ -1,29 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConfigFile = exports.DEPRECATED_FULL_PAGE_MODULES = exports.ResourceDefinitionMissingError = exports.InvalidManifestError = void 0;
4
- exports.findUIKit1Modules = findUIKit1Modules;
5
- exports.findDeprecatedFullPageModules = findDeprecatedFullPageModules;
6
- const tslib_1 = require("tslib");
7
- const yaml_1 = require("yaml");
8
- const ui_1 = require("../ui");
9
- const _1 = require("./");
10
- const case_1 = tslib_1.__importDefault(require("case"));
11
- const config_1 = require("./config");
12
- const manifest_1 = require("@forge/manifest");
13
- const url_1 = require("url");
14
- const shared_1 = require("../shared");
15
- class InvalidManifestError extends shared_1.ValidationError {
1
+ import { parseDocument, isMap } from 'yaml';
2
+ import { Text } from '../ui/index.js';
3
+ import { manifestFileName } from './index.js';
4
+ import Case from 'case';
5
+ import { isHostedResourceModule, ModuleEntryPoints, validateResource } from './config.js';
6
+ import { ManifestParserBuilder, getValidModules, parseResourceReference } from '@forge/manifest';
7
+ import { URL } from 'url';
8
+ import { UserError, ValidationError } from '../shared/index.js';
9
+ export class InvalidManifestError extends ValidationError {
16
10
  constructor() {
17
- super(ui_1.Text.artifact.error.invalidYaml(_1.manifestFileName));
11
+ super(Text.artifact.error.invalidYaml(manifestFileName));
18
12
  }
19
13
  }
20
- exports.InvalidManifestError = InvalidManifestError;
21
- class ResourceDefinitionMissingError extends shared_1.UserError {
14
+ export class ResourceDefinitionMissingError extends UserError {
22
15
  constructor(resources) {
23
- super(ui_1.Text.error.resourceDefinitionMissing(resources));
16
+ super(Text.error.resourceDefinitionMissing(resources));
24
17
  }
25
18
  }
26
- exports.ResourceDefinitionMissingError = ResourceDefinitionMissingError;
27
19
  const isUIKit1 = (module) => {
28
20
  return (typeof module === 'object' &&
29
21
  module !== null &&
@@ -31,7 +23,7 @@ const isUIKit1 = (module) => {
31
23
  !module.hasOwnProperty('render') &&
32
24
  !module.hasOwnProperty('resource'));
33
25
  };
34
- function findUIKit1Modules(modules) {
26
+ export function findUIKit1Modules(modules) {
35
27
  const allUIKit1SupportedModules = [
36
28
  'confluence:contentAction',
37
29
  'confluence:contentBylineItem',
@@ -80,7 +72,7 @@ function findUIKit1Modules(modules) {
80
72
  'compass:globalPage',
81
73
  'compass:teamPage'
82
74
  ];
83
- return (0, manifest_1.getValidModules)(modules)
75
+ return getValidModules(modules)
84
76
  .filter((moduleType) => {
85
77
  return allUIKit1SupportedModules.includes(moduleType);
86
78
  })
@@ -91,21 +83,21 @@ function findUIKit1Modules(modules) {
91
83
  .flat()
92
84
  .filter((a) => a);
93
85
  }
94
- exports.DEPRECATED_FULL_PAGE_MODULES = ['confluence:fullPage', 'jira:fullPage'];
95
- function findDeprecatedFullPageModules(modules) {
96
- return exports.DEPRECATED_FULL_PAGE_MODULES.filter((moduleType) => {
86
+ export const DEPRECATED_FULL_PAGE_MODULES = ['confluence:fullPage', 'jira:fullPage'];
87
+ export function findDeprecatedFullPageModules(modules) {
88
+ return DEPRECATED_FULL_PAGE_MODULES.filter((moduleType) => {
97
89
  const moduleItems = modules[moduleType] || [];
98
90
  return moduleItems.length > 0;
99
91
  });
100
92
  }
101
- class ConfigFile {
93
+ export class ConfigFile {
102
94
  fileReader;
103
95
  fileWriter;
104
96
  manifestParser;
105
97
  constructor(fileReader, fileWriter) {
106
98
  this.fileReader = fileReader;
107
99
  this.fileWriter = fileWriter;
108
- this.manifestParser = new manifest_1.ManifestParserBuilder().withInterpolators().build();
100
+ this.manifestParser = new ManifestParserBuilder().withInterpolators().build();
109
101
  }
110
102
  async getAppHandlers() {
111
103
  const config = await this.readConfig();
@@ -114,18 +106,18 @@ class ConfigFile {
114
106
  return handlers.map((handler) => {
115
107
  const parts = handler.split('.');
116
108
  if (parts.length !== 2) {
117
- throw new shared_1.ValidationError(ui_1.Text.error.handlerFormat(handler));
109
+ throw new ValidationError(Text.error.handlerFormat(handler));
118
110
  }
119
111
  const [module, func] = parts;
120
112
  return { module, func };
121
113
  });
122
114
  }
123
115
  async readConfig() {
124
- const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
116
+ const manifestFileContents = this.fileReader.readFile(manifestFileName);
125
117
  try {
126
118
  return this.manifestParser.parseManifest({
127
119
  content: manifestFileContents,
128
- filePath: _1.manifestFileName
120
+ filePath: manifestFileName
129
121
  });
130
122
  }
131
123
  catch {
@@ -141,8 +133,8 @@ class ConfigFile {
141
133
  const skipAddingAppNameToModules = ['function', 'action'];
142
134
  for (const [moduleKey, moduleArray] of Object.entries(modules)) {
143
135
  actualModules[moduleKey] = moduleArray?.map((module) => {
144
- if (!skipAddingAppNameToModules.includes(moduleKey) && !moduleKey.startsWith(case_1.default.kebab(appName))) {
145
- module['key'] = case_1.default.kebab([appName, module.key].join(' '));
136
+ if (!skipAddingAppNameToModules.includes(moduleKey) && !moduleKey.startsWith(Case.kebab(appName))) {
137
+ module['key'] = Case.kebab([appName, module.key].join(' '));
146
138
  if ('title' in module) {
147
139
  module['title'] = appName;
148
140
  }
@@ -156,10 +148,10 @@ class ConfigFile {
156
148
  return actualModules;
157
149
  }
158
150
  async prependAppNameToModules(name) {
159
- const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
160
- const currentConfigDoc = (0, yaml_1.parseDocument)(manifestFileContents || '');
151
+ const manifestFileContents = this.fileReader.readFile(manifestFileName);
152
+ const currentConfigDoc = parseDocument(manifestFileContents || '');
161
153
  const modules = currentConfigDoc.get('modules');
162
- if ((0, yaml_1.isMap)(modules)) {
154
+ if (isMap(modules)) {
163
155
  const modulesObject = modules.toJSON();
164
156
  const modulesWithUniqueName = this.makeManifestUnique(modulesObject, name);
165
157
  currentConfigDoc.set('modules', modulesWithUniqueName);
@@ -167,11 +159,11 @@ class ConfigFile {
167
159
  }
168
160
  }
169
161
  writeManifest(doc) {
170
- this.fileWriter.writeStringToFile(doc.toString({ nullStr: '' }), _1.manifestFileName);
162
+ this.fileWriter.writeStringToFile(doc.toString({ nullStr: '' }), manifestFileName);
171
163
  }
172
164
  async writeToConfigFile(configKey, config) {
173
- const manifestFileContents = this.fileReader.readFile(_1.manifestFileName);
174
- const currentConfigDoc = (0, yaml_1.parseDocument)(manifestFileContents || '');
165
+ const manifestFileContents = this.fileReader.readFile(manifestFileName);
166
+ const currentConfigDoc = parseDocument(manifestFileContents || '');
175
167
  Object.keys(config).forEach((key) => {
176
168
  if (config[key] === undefined) {
177
169
  delete config[key];
@@ -182,16 +174,16 @@ class ConfigFile {
182
174
  }
183
175
  getHostedResourceModules(modules) {
184
176
  const modulesArray = Object.values(modules).flat();
185
- return modulesArray.filter(config_1.isHostedResourceModule);
177
+ return modulesArray.filter(isHostedResourceModule);
186
178
  }
187
179
  assertNoMissingResources(modules, resources) {
188
180
  const modulesResourcesKeys = modules
189
181
  .flatMap((module) => {
190
- return [module.resource, ...config_1.ModuleEntryPoints.map((entryPoint) => module[entryPoint]?.resource || '')];
182
+ return [module.resource, ...ModuleEntryPoints.map((entryPoint) => module[entryPoint]?.resource || '')];
191
183
  })
192
184
  .filter(Boolean);
193
185
  const missingModuleResourcesKeys = modulesResourcesKeys.filter((resourceReference) => {
194
- const { resourceKey } = (0, manifest_1.parseResourceReference)(resourceReference);
186
+ const { resourceKey } = parseResourceReference(resourceReference);
195
187
  return !resources.some((resource) => resource.key === resourceKey);
196
188
  });
197
189
  if (missingModuleResourcesKeys.length > 0) {
@@ -206,11 +198,11 @@ class ConfigFile {
206
198
  if (remote.key === remoteEgressPermission) {
207
199
  if (typeof remote.baseUrl === 'string') {
208
200
  const baseUrl = remote.baseUrl;
209
- return new url_1.URL(baseUrl).hostname;
201
+ return new URL(baseUrl).hostname;
210
202
  }
211
203
  else if (typeof remote.baseUrl == 'object') {
212
204
  const baseUrl = remote.baseUrl.default;
213
- return new url_1.URL(baseUrl).hostname;
205
+ return new URL(baseUrl).hostname;
214
206
  }
215
207
  }
216
208
  }
@@ -236,7 +228,7 @@ class ConfigFile {
236
228
  if (this.instanceOfRemote(url)) {
237
229
  return this.getRemoteFromEgressPermission(url.remote, remotes);
238
230
  }
239
- return new url_1.URL(typeof url === 'object' ? url.address : url).hostname;
231
+ return new URL(typeof url === 'object' ? url.address : url).hostname;
240
232
  }
241
233
  catch (e) {
242
234
  }
@@ -262,7 +254,7 @@ class ConfigFile {
262
254
  const { modules, resources } = await this.readConfig();
263
255
  const hostedResourceModules = modules ? this.getHostedResourceModules(modules) : [];
264
256
  const maybeResources = resources || [];
265
- const validResources = maybeResources.filter(config_1.validateResource);
257
+ const validResources = maybeResources.filter(validateResource);
266
258
  this.assertNoMissingResources(hostedResourceModules, validResources);
267
259
  const validResourcesWithDetails = validResources.map((resource) => ({
268
260
  ...resource,
@@ -281,12 +273,12 @@ class ConfigFile {
281
273
  const linkedModule = allModules.find((m) => {
282
274
  if (!m.resource)
283
275
  return false;
284
- const { resourceKey: moduleResourceKey } = (0, manifest_1.parseResourceReference)(m.resource);
276
+ const { resourceKey: moduleResourceKey } = parseResourceReference(m.resource);
285
277
  return moduleResourceKey === resourceKey;
286
278
  }) ??
287
279
  allModules
288
280
  .reduce((acc, m) => {
289
- config_1.ModuleEntryPoints.forEach((entryPoint) => {
281
+ ModuleEntryPoints.forEach((entryPoint) => {
290
282
  const entryPointModule = m[entryPoint];
291
283
  if (entryPointModule) {
292
284
  acc.push(entryPointModule);
@@ -297,7 +289,7 @@ class ConfigFile {
297
289
  .find(({ resource }) => {
298
290
  if (!resource)
299
291
  return false;
300
- const { resourceKey: moduleResourceKey } = (0, manifest_1.parseResourceReference)(resource);
292
+ const { resourceKey: moduleResourceKey } = parseResourceReference(resource);
301
293
  return moduleResourceKey === resourceKey;
302
294
  });
303
295
  if (!linkedModule) {
@@ -306,4 +298,3 @@ class ConfigFile {
306
298
  return linkedModule.render === 'native' ? 'nativeUI' : 'customUI';
307
299
  }
308
300
  }
309
- exports.ConfigFile = ConfigFile;
@@ -1,13 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertive = exports.AssertiveConfigSectionReader = exports.ConfigSectionNotFoundError = exports.InvalidConfigSectionError = void 0;
4
- class InvalidConfigSectionError extends Error {
1
+ export class InvalidConfigSectionError extends Error {
5
2
  }
6
- exports.InvalidConfigSectionError = InvalidConfigSectionError;
7
- class ConfigSectionNotFoundError extends Error {
3
+ export class ConfigSectionNotFoundError extends Error {
8
4
  }
9
- exports.ConfigSectionNotFoundError = ConfigSectionNotFoundError;
10
- class AssertiveConfigSectionReader {
5
+ export class AssertiveConfigSectionReader {
11
6
  configSectionReader;
12
7
  constructor(configSectionReader) {
13
8
  this.configSectionReader = configSectionReader;
@@ -25,6 +20,4 @@ class AssertiveConfigSectionReader {
25
20
  }
26
21
  }
27
22
  }
28
- exports.AssertiveConfigSectionReader = AssertiveConfigSectionReader;
29
- const assertive = (configSectionReader) => new AssertiveConfigSectionReader(configSectionReader);
30
- exports.assertive = assertive;
23
+ export const assertive = (configSectionReader) => new AssertiveConfigSectionReader(configSectionReader);
@@ -1,5 +1,5 @@
1
1
  import { ManifestSchema, Resources } from '@forge/manifest';
2
- import { type ResourceDetails } from './config-file';
2
+ import { type ResourceDetails } from './config-file.js';
3
3
  export declare const manifestFileName = "manifest.yml";
4
4
  export declare const dependencyFileNames: string[];
5
5
  export declare const ModuleEntryPoints: readonly ["view", "edit", "create", "contextConfig", "config", "target"];
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAAqD,CAAC;AAEtF,eAAO,MAAM,iBAAiB,0EAA2E,CAAC;AAC1G,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,UAAU;CAC9C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,qBAAqB;CACzD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,CAAC,SAAS,MAA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AAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9F,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,gBAAgB,GAAI,UAAU,GAAG,KAAG,QAAQ,IAAI,SAG5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,GAAG,KAAG,MAAM,IAAI,qBAG9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,eAAe,KAAG,OAEhE,CAAC"}
@@ -1,20 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldBundleResource = exports.isHostedResourceModule = exports.validateResource = exports.ModuleEntryPoints = exports.dependencyFileNames = exports.manifestFileName = void 0;
4
- exports.manifestFileName = 'manifest.yml';
5
- exports.dependencyFileNames = ['package.json', 'package-lock.json', 'yarn.lock'];
6
- exports.ModuleEntryPoints = ['view', 'edit', 'create', 'contextConfig', 'config', 'target'];
7
- const validateResource = (resource) => {
1
+ export const manifestFileName = 'manifest.yml';
2
+ export const dependencyFileNames = ['package.json', 'package-lock.json', 'yarn.lock'];
3
+ export const ModuleEntryPoints = ['view', 'edit', 'create', 'contextConfig', 'config', 'target'];
4
+ export const validateResource = (resource) => {
8
5
  const { key, path } = resource;
9
6
  return typeof key === 'string' && typeof path === 'string';
10
7
  };
11
- exports.validateResource = validateResource;
12
- const isHostedResourceModule = (module) => {
8
+ export const isHostedResourceModule = (module) => {
13
9
  const resource = module.resource;
14
- return resource !== undefined || exports.ModuleEntryPoints.some((entryPoint) => module[entryPoint]?.resource !== undefined);
10
+ return resource !== undefined || ModuleEntryPoints.some((entryPoint) => module[entryPoint]?.resource !== undefined);
15
11
  };
16
- exports.isHostedResourceModule = isHostedResourceModule;
17
- const shouldBundleResource = (resource) => {
12
+ export const shouldBundleResource = (resource) => {
18
13
  return resource.resourceType === 'nativeUI' && !resource.bundler;
19
14
  };
20
- exports.shouldBundleResource = shouldBundleResource;
@@ -1,7 +1,7 @@
1
- export * from './config-codec-types';
2
- export * from './config-file-section-reader';
3
- export * from './config-file-section-writer';
4
- export * from './config-file';
5
- export * from './config-section';
6
- export * from './config';
1
+ export * from './config-codec-types.js';
2
+ export * from './config-file-section-reader.js';
3
+ export * from './config-file-section-writer.js';
4
+ export * from './config-file.js';
5
+ export * from './config-section.js';
6
+ export * from './config.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./config-codec-types"), exports);
5
- tslib_1.__exportStar(require("./config-file-section-reader"), exports);
6
- tslib_1.__exportStar(require("./config-file-section-writer"), exports);
7
- tslib_1.__exportStar(require("./config-file"), exports);
8
- tslib_1.__exportStar(require("./config-section"), exports);
9
- tslib_1.__exportStar(require("./config"), exports);
1
+ export * from './config-codec-types.js';
2
+ export * from './config-file-section-reader.js';
3
+ export * from './config-file-section-writer.js';
4
+ export * from './config-file.js';
5
+ export * from './config-section.js';
6
+ export * from './config.js';
@@ -1,5 +1,5 @@
1
- import { UserError } from '../shared';
2
- import { Logger } from '../ui';
1
+ import { UserError } from '../shared/index.js';
2
+ import { Logger } from '../ui/index.js';
3
3
  export declare abstract class Archiver {
4
4
  abstract addContent(fileName: string, contents: Buffer): void;
5
5
  abstract addFrom(fileName: string, filePath: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/file-system/archiver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,8BAAsB,QAAQ;aACZ,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;aAKpD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;aACjD,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAMpC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI;CAS5D;AAED,qBAAa,aAAc,SAAQ,SAAS;CAAG;AA4B/C,qBAAa,WAAY,SAAQ,QAAQ;IAMrC,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,OAAO,CAAmC;IAElD,OAAO;WAaa,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKzD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMpD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAA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AMpD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAM3C,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CAIzC"}
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MultiArchiver = exports.DirectoryArchiver = exports.ZipArchiver = exports.ArchiverError = exports.Archiver = void 0;
4
- const tslib_1 = require("tslib");
5
- const fs_1 = require("fs");
6
- const path_1 = tslib_1.__importDefault(require("path"));
7
- const tmp_1 = tslib_1.__importDefault(require("tmp"));
8
- const shared_1 = require("../shared");
9
- class Archiver {
1
+ import { mkdirSync, createWriteStream, cpSync, rmSync, statSync, writeFileSync } from 'fs';
2
+ import path from 'path';
3
+ import tmp from 'tmp';
4
+ import { UserError } from '../shared/index.js';
5
+ export class Archiver {
10
6
  addMany(entries) {
11
7
  for (const [name, output] of entries) {
12
8
  if (Buffer.isBuffer(output)) {
@@ -18,10 +14,8 @@ class Archiver {
18
14
  }
19
15
  }
20
16
  }
21
- exports.Archiver = Archiver;
22
- class ArchiverError extends shared_1.UserError {
17
+ export class ArchiverError extends UserError {
23
18
  }
24
- exports.ArchiverError = ArchiverError;
25
19
  const invalidArchivePathMessage = (fileName) => `Invalid archive path "${fileName}"`;
26
20
  const archiveContentAddedMessage = (fileName) => `Added archive content "${fileName}"`;
27
21
  const archiveFileAddedMessage = (fileName, filePath) => `Added archive file "${fileName}" from "${filePath}"`;
@@ -29,22 +23,22 @@ function validateArchivePath(fileName) {
29
23
  if (!fileName) {
30
24
  return;
31
25
  }
32
- const normalizedPath = path_1.default.posix.normalize(fileName.replace(/\\/g, '/'));
33
- if (path_1.default.posix.isAbsolute(normalizedPath) || normalizedPath === '..' || normalizedPath.startsWith('../')) {
26
+ const normalizedPath = path.posix.normalize(fileName.replace(/\\/g, '/'));
27
+ if (path.posix.isAbsolute(normalizedPath) || normalizedPath === '..' || normalizedPath.startsWith('../')) {
34
28
  throw new ArchiverError(invalidArchivePathMessage(fileName));
35
29
  }
36
30
  }
37
- class ZipArchiver extends Archiver {
31
+ export class ZipArchiver extends Archiver {
38
32
  archive;
39
33
  logger;
40
- tempFile = tmp_1.default.fileSync({ postfix: '.zip' });
34
+ tempFile = tmp.fileSync({ postfix: '.zip' });
41
35
  resolves = [];
42
36
  rejects = [];
43
37
  constructor(archive, logger) {
44
38
  super();
45
39
  this.archive = archive;
46
40
  this.logger = logger;
47
- const output = (0, fs_1.createWriteStream)(this.tempFile.name);
41
+ const output = createWriteStream(this.tempFile.name);
48
42
  this.archive.pipe(output);
49
43
  output.on('close', this.onClose);
50
44
  this.archive.on('warning', this.onArchiveError);
@@ -61,7 +55,7 @@ class ZipArchiver extends Archiver {
61
55
  }
62
56
  addFrom(fileName, filePath) {
63
57
  validateArchivePath(fileName);
64
- if ((0, fs_1.statSync)(filePath).isDirectory()) {
58
+ if (statSync(filePath).isDirectory()) {
65
59
  this.archive.directory(filePath, fileName || false);
66
60
  }
67
61
  else {
@@ -91,15 +85,14 @@ class ZipArchiver extends Archiver {
91
85
  }
92
86
  };
93
87
  }
94
- exports.ZipArchiver = ZipArchiver;
95
- class DirectoryArchiver extends Archiver {
88
+ export class DirectoryArchiver extends Archiver {
96
89
  target;
97
90
  constructor(target, clear = true) {
98
91
  super();
99
92
  this.target = target;
100
93
  if (clear) {
101
94
  try {
102
- (0, fs_1.rmSync)(this.target, { recursive: true, force: true });
95
+ rmSync(this.target, { recursive: true, force: true });
103
96
  }
104
97
  catch (e) {
105
98
  throw new ArchiverError(e.message);
@@ -109,9 +102,9 @@ class DirectoryArchiver extends Archiver {
109
102
  addContent(fileName, contents) {
110
103
  validateArchivePath(fileName);
111
104
  try {
112
- const targetName = path_1.default.join(this.target, fileName);
113
- (0, fs_1.mkdirSync)(path_1.default.dirname(targetName), { recursive: true });
114
- (0, fs_1.writeFileSync)(targetName, contents);
105
+ const targetName = path.join(this.target, fileName);
106
+ mkdirSync(path.dirname(targetName), { recursive: true });
107
+ writeFileSync(targetName, contents);
115
108
  }
116
109
  catch (e) {
117
110
  throw new ArchiverError(e.message);
@@ -120,8 +113,8 @@ class DirectoryArchiver extends Archiver {
120
113
  addFrom(fileName, filePath) {
121
114
  validateArchivePath(fileName);
122
115
  try {
123
- const targetName = path_1.default.join(this.target, fileName);
124
- (0, fs_1.cpSync)(filePath, targetName, { recursive: true });
116
+ const targetName = path.join(this.target, fileName);
117
+ cpSync(filePath, targetName, { recursive: true });
125
118
  }
126
119
  catch (e) {
127
120
  throw new ArchiverError(e.message);
@@ -131,8 +124,7 @@ class DirectoryArchiver extends Archiver {
131
124
  return this.target;
132
125
  }
133
126
  }
134
- exports.DirectoryArchiver = DirectoryArchiver;
135
- class MultiArchiver extends Archiver {
127
+ export class MultiArchiver extends Archiver {
136
128
  archivers;
137
129
  constructor(archivers) {
138
130
  super();
@@ -153,4 +145,3 @@ class MultiArchiver extends Archiver {
153
145
  return paths[0];
154
146
  }
155
147
  }
156
- exports.MultiArchiver = MultiArchiver;
@@ -1 +1 @@
1
- {"version":3,"file":"file-system-reader.d.ts","sourceRoot":"","sources":["../../src/file-system/file-system-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,IAAI,CAAC;AAS9C,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC;AAEjE,qBAAa,gBAAgB;IACpB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQxC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAS5D,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAgBt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