permaweb-deploy 0.0.0-alpha-20251208223828

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 (74) hide show
  1. package/README.md +533 -0
  2. package/bin/dev.js +5 -0
  3. package/bin/run.js +5 -0
  4. package/dist/commands/deploy.js +227 -0
  5. package/dist/commands/deploy.js.map +1 -0
  6. package/dist/constants/flags.js +190 -0
  7. package/dist/constants/flags.js.map +1 -0
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/prompts/arns.js +89 -0
  11. package/dist/prompts/arns.js.map +1 -0
  12. package/dist/prompts/deployment.js +27 -0
  13. package/dist/prompts/deployment.js.map +1 -0
  14. package/dist/prompts/wallet.js +51 -0
  15. package/dist/prompts/wallet.js.map +1 -0
  16. package/dist/src/commands/deploy.d.ts +9 -0
  17. package/dist/src/commands/deploy.d.ts.map +1 -0
  18. package/dist/src/constants/flags.d.ts +84 -0
  19. package/dist/src/constants/flags.d.ts.map +1 -0
  20. package/dist/src/index.d.ts +2 -0
  21. package/dist/src/index.d.ts.map +1 -0
  22. package/dist/src/prompts/arns.d.ts +13 -0
  23. package/dist/src/prompts/arns.d.ts.map +1 -0
  24. package/dist/src/prompts/deployment.d.ts +6 -0
  25. package/dist/src/prompts/deployment.d.ts.map +1 -0
  26. package/dist/src/prompts/wallet.d.ts +11 -0
  27. package/dist/src/prompts/wallet.d.ts.map +1 -0
  28. package/dist/src/types/index.d.ts +31 -0
  29. package/dist/src/types/index.d.ts.map +1 -0
  30. package/dist/src/utils/__tests__/constants.test.d.ts +2 -0
  31. package/dist/src/utils/__tests__/constants.test.d.ts.map +1 -0
  32. package/dist/src/utils/config-resolver.d.ts +72 -0
  33. package/dist/src/utils/config-resolver.d.ts.map +1 -0
  34. package/dist/src/utils/constants.d.ts +4 -0
  35. package/dist/src/utils/constants.d.ts.map +1 -0
  36. package/dist/src/utils/path.d.ts +5 -0
  37. package/dist/src/utils/path.d.ts.map +1 -0
  38. package/dist/src/utils/signer.d.ts +17 -0
  39. package/dist/src/utils/signer.d.ts.map +1 -0
  40. package/dist/src/utils/uploader.d.ts +8 -0
  41. package/dist/src/utils/uploader.d.ts.map +1 -0
  42. package/dist/src/utils/validators.d.ts +29 -0
  43. package/dist/src/utils/validators.d.ts.map +1 -0
  44. package/dist/tests/constants.d.ts +11 -0
  45. package/dist/tests/constants.d.ts.map +1 -0
  46. package/dist/tests/e2e/deploy-command.test.d.ts +2 -0
  47. package/dist/tests/e2e/deploy-command.test.d.ts.map +1 -0
  48. package/dist/tests/global-setup.d.ts +6 -0
  49. package/dist/tests/global-setup.d.ts.map +1 -0
  50. package/dist/tests/mocks/turbo-handlers.d.ts +105 -0
  51. package/dist/tests/mocks/turbo-handlers.d.ts.map +1 -0
  52. package/dist/tests/setup.d.ts +11 -0
  53. package/dist/tests/setup.d.ts.map +1 -0
  54. package/dist/tests/types/payment-service.d.ts +218 -0
  55. package/dist/tests/types/payment-service.d.ts.map +1 -0
  56. package/dist/tests/types/upload-service.d.ts +168 -0
  57. package/dist/tests/types/upload-service.d.ts.map +1 -0
  58. package/dist/tests/unit/validators.test.d.ts +2 -0
  59. package/dist/tests/unit/validators.test.d.ts.map +1 -0
  60. package/dist/types/index.js +2 -0
  61. package/dist/types/index.js.map +1 -0
  62. package/dist/utils/config-resolver.js +39 -0
  63. package/dist/utils/config-resolver.js.map +1 -0
  64. package/dist/utils/constants.js +6 -0
  65. package/dist/utils/constants.js.map +1 -0
  66. package/dist/utils/path.js +15 -0
  67. package/dist/utils/path.js.map +1 -0
  68. package/dist/utils/signer.js +40 -0
  69. package/dist/utils/signer.js.map +1 -0
  70. package/dist/utils/uploader.js +78 -0
  71. package/dist/utils/uploader.js.map +1 -0
  72. package/dist/utils/validators.js +62 -0
  73. package/dist/utils/validators.js.map +1 -0
  74. package/package.json +108 -0
@@ -0,0 +1,51 @@
1
+ import { select, input } from '@inquirer/prompts';
2
+ import { validateFileExists } from '../utils/validators.js';
3
+
4
+ async function promptWalletMethod() {
5
+ return select({
6
+ choices: [
7
+ { name: "Wallet file path", value: "file" },
8
+ { name: "Private key/JWK string", value: "string" },
9
+ { name: "Environment variable (DEPLOY_KEY)", value: "env" }
10
+ ],
11
+ message: "How do you want to provide your wallet?"
12
+ });
13
+ }
14
+ async function promptWalletFile() {
15
+ return input({
16
+ default: "./wallet.json",
17
+ message: "Enter wallet file path:",
18
+ validate: validateFileExists
19
+ });
20
+ }
21
+ async function promptPrivateKey() {
22
+ return input({
23
+ message: "Enter your private key or JWK JSON:",
24
+ required: true
25
+ });
26
+ }
27
+ async function promptSignerType() {
28
+ return select({
29
+ choices: [
30
+ { name: "Arweave", value: "arweave" },
31
+ { name: "Ethereum", value: "ethereum" },
32
+ { name: "Polygon", value: "polygon" },
33
+ { name: "KYVE", value: "kyve" }
34
+ ],
35
+ default: "arweave",
36
+ message: "Select signer type:"
37
+ });
38
+ }
39
+ async function getWalletConfig() {
40
+ const method = await promptWalletMethod();
41
+ const config = { method };
42
+ if (method === "file") {
43
+ config.wallet = await promptWalletFile();
44
+ } else if (method === "string") {
45
+ config.privateKey = await promptPrivateKey();
46
+ }
47
+ return config;
48
+ }
49
+
50
+ export { getWalletConfig, promptPrivateKey, promptSignerType, promptWalletFile, promptWalletMethod };
51
+ //# sourceMappingURL=wallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.js","sources":["../../src/prompts/wallet.ts"],"sourcesContent":["import { input, select } from '@inquirer/prompts'\n\nimport { validateFileExists } from '../utils/validators.js'\n\nexport interface WalletConfig {\n method: 'env' | 'file' | 'string'\n privateKey?: string\n wallet?: string\n}\n\nexport async function promptWalletMethod(): Promise<string> {\n return select({\n choices: [\n { name: 'Wallet file path', value: 'file' },\n { name: 'Private key/JWK string', value: 'string' },\n { name: 'Environment variable (DEPLOY_KEY)', value: 'env' },\n ],\n message: 'How do you want to provide your wallet?',\n })\n}\n\nexport async function promptWalletFile(): Promise<string> {\n return input({\n default: './wallet.json',\n message: 'Enter wallet file path:',\n validate: validateFileExists,\n })\n}\n\nexport async function promptPrivateKey(): Promise<string> {\n return input({\n message: 'Enter your private key or JWK JSON:',\n required: true,\n })\n}\n\nexport async function promptSignerType(): Promise<string> {\n return select({\n choices: [\n { name: 'Arweave', value: 'arweave' },\n { name: 'Ethereum', value: 'ethereum' },\n { name: 'Polygon', value: 'polygon' },\n { name: 'KYVE', value: 'kyve' },\n ],\n default: 'arweave',\n message: 'Select signer type:',\n })\n}\n\nexport async function getWalletConfig(): Promise<WalletConfig> {\n const method = (await promptWalletMethod()) as 'env' | 'file' | 'string'\n\n const config: WalletConfig = { method }\n\n if (method === 'file') {\n config.wallet = await promptWalletFile()\n } else if (method === 'string') {\n config.privateKey = await promptPrivateKey()\n }\n\n return config\n}\n"],"names":[],"mappings":";;;AAUA,eAAsB,kBAAA,GAAsC;AAC1D,EAAA,OAAO,MAAA,CAAO;AAAA,IACZ,OAAA,EAAS;AAAA,MACP,EAAE,IAAA,EAAM,kBAAA,EAAoB,KAAA,EAAO,MAAA,EAAO;AAAA,MAC1C,EAAE,IAAA,EAAM,wBAAA,EAA0B,KAAA,EAAO,QAAA,EAAS;AAAA,MAClD,EAAE,IAAA,EAAM,mCAAA,EAAqC,KAAA,EAAO,KAAA;AAAM,KAC5D;AAAA,IACA,OAAA,EAAS;AAAA,GACV,CAAA;AACH;AAEA,eAAsB,gBAAA,GAAoC;AACxD,EAAA,OAAO,KAAA,CAAM;AAAA,IACX,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,yBAAA;AAAA,IACT,QAAA,EAAU;AAAA,GACX,CAAA;AACH;AAEA,eAAsB,gBAAA,GAAoC;AACxD,EAAA,OAAO,KAAA,CAAM;AAAA,IACX,OAAA,EAAS,qCAAA;AAAA,IACT,QAAA,EAAU;AAAA,GACX,CAAA;AACH;AAEA,eAAsB,gBAAA,GAAoC;AACxD,EAAA,OAAO,MAAA,CAAO;AAAA,IACZ,OAAA,EAAS;AAAA,MACP,EAAE,IAAA,EAAM,SAAA,EAAW,KAAA,EAAO,SAAA,EAAU;AAAA,MACpC,EAAE,IAAA,EAAM,UAAA,EAAY,KAAA,EAAO,UAAA,EAAW;AAAA,MACtC,EAAE,IAAA,EAAM,SAAA,EAAW,KAAA,EAAO,SAAA,EAAU;AAAA,MACpC,EAAE,IAAA,EAAM,MAAA,EAAQ,KAAA,EAAO,MAAA;AAAO,KAChC;AAAA,IACA,OAAA,EAAS,SAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACV,CAAA;AACH;AAEA,eAAsB,eAAA,GAAyC;AAC7D,EAAA,MAAM,MAAA,GAAU,MAAM,kBAAA,EAAmB;AAEzC,EAAA,MAAM,MAAA,GAAuB,EAAE,MAAA,EAAO;AAEtC,EAAA,IAAI,WAAW,MAAA,EAAQ;AACrB,IAAA,MAAA,CAAO,MAAA,GAAS,MAAM,gBAAA,EAAiB;AAAA,EACzC,CAAA,MAAA,IAAW,WAAW,QAAA,EAAU;AAC9B,IAAA,MAAA,CAAO,UAAA,GAAa,MAAM,gBAAA,EAAiB;AAAA,EAC7C;AAEA,EAAA,OAAO,MAAA;AACT;;;;"}
@@ -0,0 +1,9 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class Deploy extends Command {
3
+ static args: {};
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: Record<string, any>;
7
+ run(): Promise<void>;
8
+ }
9
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAgBrC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,OAAgB,IAAI,KAAK;IAEzB,OAAgB,WAAW,SAA4C;IAEvE,OAAgB,QAAQ,WASvB;IAED,OAAgB,KAAK,sBAAkC;IAE1C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoQlC"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Global flag definitions - single source of truth for all flags
3
+ * Each flag includes its oclif definition and optional prompt function
4
+ */
5
+ export declare const globalFlags: {
6
+ arioProcess: import("../utils/config-resolver.js").FlagConfig<string, any>;
7
+ arnsName: import("../utils/config-resolver.js").FlagConfig<string, any>;
8
+ deployFile: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
9
+ deployFolder: import("../utils/config-resolver.js").FlagConfig<string, any>;
10
+ maxTokenAmount: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
11
+ onDemand: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
12
+ privateKey: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
13
+ sigType: import("../utils/config-resolver.js").FlagConfig<string, any>;
14
+ ttlSeconds: import("../utils/config-resolver.js").FlagConfig<string, any>;
15
+ undername: import("../utils/config-resolver.js").FlagConfig<string, any>;
16
+ wallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
17
+ };
18
+ /**
19
+ * Complete set of flags for the deploy command
20
+ */
21
+ export declare const deployFlags: {
22
+ 'ario-process': any;
23
+ 'arns-name': any;
24
+ 'deploy-file': any;
25
+ 'deploy-folder': any;
26
+ 'max-token-amount': any;
27
+ 'on-demand': any;
28
+ 'private-key': any;
29
+ 'sig-type': any;
30
+ 'ttl-seconds': any;
31
+ undername: any;
32
+ wallet: any;
33
+ };
34
+ /**
35
+ * ArNS-specific flags (subset of deploy flags)
36
+ */
37
+ export declare const arnsFlags: {
38
+ 'ario-process': any;
39
+ 'arns-name': any;
40
+ 'ttl-seconds': any;
41
+ undername: any;
42
+ };
43
+ /**
44
+ * Wallet/authentication flags (subset of deploy flags)
45
+ */
46
+ export declare const walletFlags: {
47
+ 'private-key': any;
48
+ 'sig-type': any;
49
+ wallet: any;
50
+ };
51
+ /**
52
+ * Deploy command configuration type
53
+ */
54
+ export interface DeployConfig {
55
+ 'ario-process': string;
56
+ 'arns-name': string;
57
+ 'deploy-file'?: string;
58
+ 'deploy-folder': string;
59
+ 'max-token-amount'?: string;
60
+ 'on-demand'?: string;
61
+ 'private-key'?: string;
62
+ 'sig-type': string;
63
+ 'ttl-seconds': string;
64
+ undername: string;
65
+ wallet?: string;
66
+ }
67
+ /**
68
+ * Deploy command flag configurations
69
+ * Maps kebab-case flag names to their camelCase globalFlags definitions
70
+ */
71
+ export declare const deployFlagConfigs: {
72
+ readonly 'ario-process': import("../utils/config-resolver.js").FlagConfig<string, any>;
73
+ readonly 'arns-name': import("../utils/config-resolver.js").FlagConfig<string, any>;
74
+ readonly 'deploy-file': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
75
+ readonly 'deploy-folder': import("../utils/config-resolver.js").FlagConfig<string, any>;
76
+ readonly 'max-token-amount': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
77
+ readonly 'on-demand': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
78
+ readonly 'private-key': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
79
+ readonly 'sig-type': import("../utils/config-resolver.js").FlagConfig<string, any>;
80
+ readonly 'ttl-seconds': import("../utils/config-resolver.js").FlagConfig<string, any>;
81
+ readonly undername: import("../utils/config-resolver.js").FlagConfig<string, any>;
82
+ readonly wallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
83
+ };
84
+ //# sourceMappingURL=flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/constants/flags.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAkJvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAYvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;CAKrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;CAIvB,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;CAYpB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { run } from '@oclif/core';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,13 @@
1
+ export interface AdvancedOptions {
2
+ arioProcess: string;
3
+ maxTokenAmount?: string;
4
+ onDemand?: string;
5
+ ttlSeconds: string;
6
+ undername: string;
7
+ }
8
+ export declare function promptArnsName(): Promise<string>;
9
+ export declare function promptUndername(): Promise<string>;
10
+ export declare function promptTtl(): Promise<string>;
11
+ export declare function promptArioProcess(): Promise<string>;
12
+ export declare function promptAdvancedOptions(): Promise<AdvancedOptions | null>;
13
+ //# sourceMappingURL=arns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arns.d.ts","sourceRoot":"","sources":["../../../src/prompts/arns.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAMtD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAKvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAMjD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAmBzD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoD7E"}
@@ -0,0 +1,6 @@
1
+ export interface DeployTarget {
2
+ path: string;
3
+ type: 'file' | 'folder';
4
+ }
5
+ export declare function promptDeployTarget(): Promise<DeployTarget>;
6
+ //# sourceMappingURL=deployment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/prompts/deployment.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;CACxB;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAwBhE"}
@@ -0,0 +1,11 @@
1
+ export interface WalletConfig {
2
+ method: 'env' | 'file' | 'string';
3
+ privateKey?: string;
4
+ wallet?: string;
5
+ }
6
+ export declare function promptWalletMethod(): Promise<string>;
7
+ export declare function promptWalletFile(): Promise<string>;
8
+ export declare function promptPrivateKey(): Promise<string>;
9
+ export declare function promptSignerType(): Promise<string>;
10
+ export declare function getWalletConfig(): Promise<WalletConfig>;
11
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/prompts/wallet.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAS1D;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAMxD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAKxD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAWxD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAY7D"}
@@ -0,0 +1,31 @@
1
+ import type { Flag } from '@oclif/core/lib/interfaces';
2
+ export type SignerType = 'arweave' | 'ethereum' | 'kyve' | 'polygon';
3
+ export interface DeployOptions {
4
+ 'ario-process': string;
5
+ 'arns-name': string;
6
+ 'deploy-file': string;
7
+ 'deploy-folder': string;
8
+ 'private-key': string;
9
+ 'sig-type': SignerType;
10
+ 'ttl-seconds': string;
11
+ undername: string;
12
+ wallet: string;
13
+ }
14
+ export type DeployFlags = Partial<Record<keyof DeployOptions, Flag<string>>>;
15
+ export interface UploadResult {
16
+ id: string;
17
+ manifest?: {
18
+ paths: Record<string, {
19
+ id: string;
20
+ }>;
21
+ };
22
+ manifestResponse?: {
23
+ id: string;
24
+ };
25
+ }
26
+ export interface ArnsRecord {
27
+ processId: string;
28
+ type: string;
29
+ undernames?: string[];
30
+ }
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;AAEpE,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KACtC,CAAA;IACD,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constants.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/constants.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Configuration for a single flag with its associated prompt
3
+ */
4
+ export type FlagConfig<T = any, F = any> = {
5
+ /** The oclif flag definition */
6
+ flag: F;
7
+ /** Optional prompt function to get the value interactively */
8
+ prompt?: () => Promise<T>;
9
+ /** Transform function to apply to the resolved value */
10
+ transform?: (value: T) => T;
11
+ /** Whether this flag triggers interactive mode when missing */
12
+ triggersInteractive?: boolean;
13
+ };
14
+ /**
15
+ * Map of flag configurations
16
+ */
17
+ export type FlagConfigMap = Record<string, FlagConfig<any, any>>;
18
+ /**
19
+ * Extract the resolved config type from a FlagConfigMap
20
+ * Infers the actual type (string, number, boolean) and optionality from each FlagConfig
21
+ */
22
+ export type ResolvedConfig<T extends FlagConfigMap> = {
23
+ [K in keyof T]: T[K] extends FlagConfig<infer U, any> ? U : any;
24
+ };
25
+ /**
26
+ * Options for resolveConfig
27
+ */
28
+ export interface ResolveConfigOptions {
29
+ /** Whether to run in interactive mode */
30
+ interactive?: boolean;
31
+ /** Custom logic to determine if interactive mode should be enabled */
32
+ shouldBeInteractive?: (parsedFlags: Record<string, any>) => boolean;
33
+ }
34
+ /**
35
+ * Resolves configuration by combining parsed CLI flags with interactive prompts
36
+ *
37
+ * @param flagConfigs - Map of flag names to their configurations
38
+ * @param parsedFlags - Parsed flags from this.parse()
39
+ * @param options - Resolution options
40
+ * @returns Fully resolved configuration object
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const config = await resolveConfig(
45
+ * {
46
+ * arnsName: {
47
+ * flag: globalFlags.arnsName,
48
+ * prompt: promptArnsName,
49
+ * triggersInteractive: true,
50
+ * },
51
+ * wallet: {
52
+ * flag: globalFlags.wallet,
53
+ * prompt: async () => (await getWalletConfig()).wallet,
54
+ * },
55
+ * },
56
+ * flags,
57
+ * {
58
+ * shouldBeInteractive: (flags) => !flags['arns-name'],
59
+ * }
60
+ * )
61
+ * ```
62
+ */
63
+ export declare function resolveConfig<T extends FlagConfigMap>(flagConfigs: T, parsedFlags: Record<string, any>, options?: ResolveConfigOptions): Promise<ResolvedConfig<T>>;
64
+ /**
65
+ * Helper to create a flag configuration with proper type inference
66
+ */
67
+ export declare function createFlagConfig<T, F = any>(config: FlagConfig<T, F>): FlagConfig<T, F>;
68
+ /**
69
+ * Helper to extract just the flags from a FlagConfigMap for use in command static flags
70
+ */
71
+ export declare function extractFlags<T extends FlagConfigMap>(flagConfigs: T): Record<string, any>;
72
+ //# sourceMappingURL=config-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolver.d.ts","sourceRoot":"","sources":["../../../src/utils/config-resolver.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI;IACzC,gCAAgC;IAChC,IAAI,EAAE,CAAC,CAAA;IACP,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAA;IACzB,wDAAwD;IACxD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAA;IAC3B,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAEhE;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,aAAa,IAAI;KACnD,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG;CAChE,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAA;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,aAAa,EACzD,WAAW,EAAE,CAAC,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAqC5B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAEvF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAOzF"}
@@ -0,0 +1,4 @@
1
+ export declare const ARWEAVE_TX_ID_REGEX: RegExp;
2
+ export declare const TTL_MIN = 60;
3
+ export declare const TTL_MAX = 86400;
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAAgB,CAAA;AAEhD,eAAO,MAAM,OAAO,KAAK,CAAA;AACzB,eAAO,MAAM,OAAO,QAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Expand tilde (~) to home directory in file paths
3
+ */
4
+ export declare function expandPath(filePath: string): string;
5
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/utils/path.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUnD"}
@@ -0,0 +1,17 @@
1
+ import { ArweaveSigner } from '@ar.io/sdk';
2
+ import { EthereumSigner } from '@ardrive/turbo-sdk';
3
+ import type { SignerType } from '../types/index.js';
4
+ export declare function createSigner(sigType: SignerType, deployKey: string): {
5
+ signer: EthereumSigner;
6
+ token: "ethereum";
7
+ } | {
8
+ signer: EthereumSigner;
9
+ token: "pol";
10
+ } | {
11
+ signer: ArweaveSigner;
12
+ token: "arweave";
13
+ } | {
14
+ signer: EthereumSigner;
15
+ token: "kyve";
16
+ };
17
+ //# sourceMappingURL=signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/utils/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;EAqClE"}
@@ -0,0 +1,8 @@
1
+ import { OnDemandFunding, type TurboAuthenticatedClient } from '@ardrive/turbo-sdk';
2
+ export declare function uploadFile(turbo: TurboAuthenticatedClient, filePath: string, options?: {
3
+ fundingMode?: OnDemandFunding;
4
+ }): Promise<string>;
5
+ export declare function uploadFolder(turbo: TurboAuthenticatedClient, folderPath: string, options?: {
6
+ fundingMode?: OnDemandFunding;
7
+ }): Promise<string>;
8
+ //# sourceMappingURL=uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../src/utils/uploader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAGnF,wBAAsB,UAAU,CAC9B,KAAK,EAAE,wBAAwB,EAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACR,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B,GACA,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,wBAAsB,YAAY,CAChC,KAAK,EAAE,wBAAwB,EAC/B,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B,GACA,OAAO,CAAC,MAAM,CAAC,CAsDjB"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Validate TTL seconds
3
+ */
4
+ export declare function validateTtl(value: string): string | true;
5
+ /**
6
+ * Validate undername
7
+ */
8
+ export declare function validateUndername(value: string): string | true;
9
+ /**
10
+ * Validate ARIO process ID
11
+ */
12
+ export declare function validateArioProcess(value: string): string | true;
13
+ /**
14
+ * Validate file path exists
15
+ */
16
+ export declare function validateFileExists(value: string): string | true;
17
+ /**
18
+ * Validate folder path exists
19
+ */
20
+ export declare function validateFolderExists(value: string): string | true;
21
+ /**
22
+ * Resolve ARIO process from shorthand to actual ID
23
+ */
24
+ export declare function resolveArioProcess(value: string): string;
25
+ /**
26
+ * Validate ArNS name is not empty
27
+ */
28
+ export declare function validateArnsName(value: string): string | true;
29
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/utils/validators.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWxD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM9D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO/D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM7D"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Test Arweave wallet JWK
3
+ * Loaded from fixtures/test_wallet.json
4
+ */
5
+ export declare const TEST_ARWEAVE_WALLET: any;
6
+ /**
7
+ * Test Ethereum private key
8
+ * This is a deterministic test key - DO NOT use for real transactions
9
+ */
10
+ export declare const TEST_ETH_PRIVATE_KEY = "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../tests/constants.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAE/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uEACqC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deploy-command.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy-command.test.d.ts","sourceRoot":"","sources":["../../../tests/e2e/deploy-command.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Global setup for Vitest
3
+ * Generates TypeScript types from OpenAPI specs before running tests
4
+ */
5
+ export default function setup(): void;
6
+ //# sourceMappingURL=global-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-setup.d.ts","sourceRoot":"","sources":["../../tests/global-setup.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,SAa5B"}
@@ -0,0 +1,105 @@
1
+ import type { components as PaymentComponents } from '../types/payment-service.js';
2
+ import type { components as UploadComponents } from '../types/upload-service.js';
3
+ /**
4
+ * Type aliases from generated OpenAPI types
5
+ */
6
+ type DataItemPost = UploadComponents['schemas']['DataItemPost'];
7
+ type BalanceResponse = PaymentComponents['schemas']['BalanceResponse'];
8
+ type CreditResponse = PaymentComponents['schemas']['CreditResponse'];
9
+ type CreditedPaymentTx = PaymentComponents['schemas']['CreditedPaymentTx'];
10
+ /**
11
+ * Mock data generators for Turbo API responses
12
+ * Based on actual Turbo SDK types and API responses
13
+ */
14
+ export declare const mockTurboData: {
15
+ balanceResponse: (winc?: string) => BalanceResponse;
16
+ priceResponse: (winc?: string) => CreditResponse;
17
+ topUpResponse: (winc?: string, txId?: string) => CreditedPaymentTx;
18
+ uploadFolderResponse: (manifestId?: string) => {
19
+ fileResponses: {
20
+ dataCaches: string[];
21
+ deadlineHeight: number;
22
+ fastFinalityIndexes: string[];
23
+ id: string;
24
+ owner: string;
25
+ public: string;
26
+ signature: string;
27
+ timestamp: number;
28
+ version: string;
29
+ winc: string;
30
+ }[];
31
+ manifest: {
32
+ index: {
33
+ path: string;
34
+ };
35
+ manifest: string;
36
+ paths: {
37
+ 'index.html': {
38
+ id: string;
39
+ };
40
+ 'style.css': {
41
+ id: string;
42
+ };
43
+ };
44
+ version: string;
45
+ };
46
+ manifestResponse: {
47
+ dataCaches: string[];
48
+ deadlineHeight: number;
49
+ fastFinalityIndexes: string[];
50
+ id: string;
51
+ owner: string;
52
+ public: string;
53
+ signature: string;
54
+ timestamp: number;
55
+ version: string;
56
+ winc: string;
57
+ };
58
+ };
59
+ uploadResponse: (id?: string) => DataItemPost;
60
+ };
61
+ /**
62
+ * Default MSW handlers for Turbo Upload Service
63
+ * Based on OpenAPI spec: https://turbo.ardrive.io/api-docs
64
+ */
65
+ export declare const turboUploadHandlers: import("msw").HttpHandler[];
66
+ /**
67
+ * Default MSW handlers for Turbo Payment Service
68
+ * Based on OpenAPI spec: https://payment.ardrive.io/api-docs
69
+ */
70
+ export declare const turboPaymentHandlers: import("msw").HttpHandler[];
71
+ /**
72
+ * Default MSW handlers for AO/ArNS Service
73
+ */
74
+ export declare const aoHandlers: import("msw").HttpHandler[];
75
+ /**
76
+ * All Turbo API handlers combined
77
+ */
78
+ export declare const turboHandlers: import("msw").HttpHandler[];
79
+ /**
80
+ * Helper to create custom upload response
81
+ * @param txId - The transaction ID to return
82
+ * @returns MSW handler for upload success
83
+ */
84
+ export declare function mockUploadSuccess(txId: string): import("msw").HttpHandler;
85
+ /**
86
+ * Helper to create upload failure response
87
+ * @param status - HTTP status code
88
+ * @param message - Error message
89
+ * @returns MSW handler for upload failure
90
+ */
91
+ export declare function mockUploadFailure(status?: number, message?: string): import("msw").HttpHandler;
92
+ /**
93
+ * Helper to create insufficient balance scenario
94
+ * @param winc - Balance amount in winc
95
+ * @returns MSW handler for insufficient balance
96
+ */
97
+ export declare function mockInsufficientBalance(winc?: string): import("msw").HttpHandler;
98
+ /**
99
+ * Helper to create on-demand funding success
100
+ * @param winc - Amount topped up in winc
101
+ * @returns MSW handler for on-demand funding success
102
+ */
103
+ export declare function mockOnDemandFundingSuccess(winc?: string): import("msw").HttpHandler;
104
+ export {};
105
+ //# sourceMappingURL=turbo-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turbo-handlers.d.ts","sourceRoot":"","sources":["../../../tests/mocks/turbo-handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAEhF;;GAEG;AACH,KAAK,YAAY,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAA;AAC/D,KAAK,eAAe,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACtE,KAAK,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAA;AACpE,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAE1E;;;GAGG;AACH,eAAO,MAAM,aAAa;wCAEmB,eAAe;sCAOrB,cAAc;qDAShD,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAoEkD,YAAY;CAWnF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,6BAgH/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,6BAsChC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,6BA+LtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,6BAAmE,CAAA;AAE7F;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,6BAI7C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,SAAM,EAAE,OAAO,SAAkB,6BAIxE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,SAAQ,6BAInD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,SAAkB,6BAIhE"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * MSW Server for mocking HTTP requests in tests
3
+ * Configured to intercept requests to:
4
+ * - Turbo Upload Service (upload.ardrive.io)
5
+ * - Turbo Payment Service (payment.ardrive.io)
6
+ * - AO Compute Unit (cu.ardrive.io)
7
+ * - AO Message Unit (mu.ao-testnet.xyz)
8
+ * - Arweave GraphQL (arweave.net/graphql)
9
+ */
10
+ export declare const server: import("msw/lib/node/index.js").SetupServerApi;
11
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../tests/setup.ts"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,gDAAgC,CAAA"}