@apostlejs/tools 0.0.16 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,16 +1,17 @@
1
- import { DevFlowJson, NativeFlowJSON } from '@apostlejs/flows';
2
- import * as ajv from 'ajv';
1
+ import { WhatsappFlow } from "@apostlejs/flows";
2
+ import * as ajv from "ajv";
3
3
 
4
- declare function deployFlows(oldFlows: DevFlowJson[], newFlows: DevFlowJson[]): Promise<DevFlowJson[]>;
5
-
6
- declare const validateFlowJson: (nativeFlowJson: NativeFlowJSON) => Promise<{
7
- valid: boolean;
8
- errors: ajv.ErrorObject<string, Record<string, any>, unknown>[] | null | undefined;
4
+ //#region src/flows/tools/deploy-flows.d.ts
5
+ declare function deployFlows(oldFlows: WhatsappFlow[], newFlows: WhatsappFlow[]): Promise<WhatsappFlow[]>;
6
+ //#endregion
7
+ //#region src/flows/tools/validate-flow.d.ts
8
+ declare const validateFlow: (flow: WhatsappFlow) => Promise<{
9
+ valid: boolean;
10
+ errors: ajv.ErrorObject<string, Record<string, any>, unknown>[] | null | undefined;
9
11
  }>;
10
-
11
- type AnyType = any;
12
-
13
- type Schemas = Record<string, AnyType>;
12
+ //#endregion
13
+ //#region src/flows/schemas/index.d.ts
14
+ type Schemas = Record<string, any>;
14
15
  declare const flowSchemas: Schemas;
15
-
16
- export { deployFlows, flowSchemas, validateFlowJson };
16
+ //#endregion
17
+ export { deployFlows, flowSchemas, validateFlow };
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) [2025] [Fernando Coelho]
3
+ Copyright (c) 2026 Fernando Coelho
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -4,55 +4,72 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.16",
7
+ "version": "0.1.0",
8
8
  "type": "module",
9
+ "bin": {
10
+ "apostle": "./dist/cli.cjs"
11
+ },
9
12
  "files": [
10
13
  "dist"
11
14
  ],
12
15
  "main": "./dist/index.cjs",
13
16
  "types": "./dist/index.d.cts",
14
17
  "exports": {
15
- ".": "./dist/index.cjs"
18
+ ".": "./dist/index.cjs",
19
+ "./cli": "./dist/cli.cjs"
16
20
  },
17
21
  "typesVersions": {
18
22
  "*": {
19
23
  ".": [
20
24
  "./dist/index.d.cts"
25
+ ],
26
+ "cli": [
27
+ "./dist/cli.d.cts"
21
28
  ]
22
29
  }
23
30
  },
31
+ "oclif": {
32
+ "bin": "apostle",
33
+ "dirname": "apostle",
34
+ "commands": {
35
+ "strategy": "explicit",
36
+ "target": "./dist/cli.cjs",
37
+ "identifier": "COMMANDS"
38
+ },
39
+ "topicSeparator": " "
40
+ },
24
41
  "devDependencies": {
25
42
  "@types/node": "^22.9.1",
26
- "terser": "^5.39.0",
27
- "tsup": "8.4.0",
43
+ "@typescript/native-preview": "7.0.0-dev.20260305.1",
44
+ "tsdown": "0.21.2",
28
45
  "tsx": "^4.19.3",
29
- "typescript": "5.8.2",
30
- "@apostlejs/config": "1.0.0"
46
+ "vite-tsconfig-paths": "^6.1.1",
47
+ "vitest": "4.0.18",
48
+ "@apostlejs/config": "0.0.1"
31
49
  },
32
50
  "dependencies": {
51
+ "@oclif/core": "^4.8.4",
33
52
  "ajv": "8.17.1",
34
53
  "ajv-formats": "3.0.1",
35
- "@apostlejs/whatsapp": "0.0.20",
36
- "@apostlejs/flows": "0.0.26"
54
+ "chalk": "^5.6.2",
55
+ "glob": "^13.0.6",
56
+ "jiti": "2.4.2",
57
+ "log-symbols": "^7.0.1",
58
+ "ora": "^9.3.0",
59
+ "@apostlejs/flows": "0.1.0",
60
+ "@apostlejs/whatsapp": "0.1.0"
37
61
  },
38
62
  "peerDependencies": {
39
63
  "zod": "4.0.14"
40
64
  },
41
65
  "scripts": {
42
- "------------- toolchain -------------": "-------------",
43
66
  "format": "biome format --write",
44
67
  "lint": "biome lint --error-on-warnings",
45
- "checktypes": "tsc --noEmit",
46
- "------------- dev -------------": "-------------",
47
- "dev": "pnpm tsup --env.mode dev",
48
- "------------- build -------------": "-------------",
49
- "build": "rm -rf dist && pnpm tsup --env.mode release",
50
- "bundlesize": "pnpm build --metafile && npm pack --dry-run",
51
- "bundlesize:dev": "pnpm tsup --metafile && npm pack --dry-run",
52
- "------------- publishing -------------": "-------------",
53
- "change": "changeset",
54
- "bump": "pnpm changeset version",
55
- "release": "pnpm checktypes && pnpm build && pnpm publish --no-git-checks",
56
- "release:rc": "pnpm checktypes && pnpm build && pnpm version prerelease --preid=rc"
68
+ "checktypes": "tsgo --noEmit",
69
+ "dev": "tsdown --watch",
70
+ "build": "tsdown",
71
+ "bundlesize": "pnpm build && npm pack --dry-run",
72
+ "test": "vitest run",
73
+ "test:watch": "vitest"
57
74
  }
58
75
  }