@antelopejs/dms-saas 0.0.2 → 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/README.md CHANGED
@@ -137,9 +137,10 @@ provider registered before dms-saas is constructed is held and replayed on
137
137
  attach, replayed again when dms-saas is reloaded, and dropped when the
138
138
  registering module is unloaded.
139
139
 
140
- The interface package must be released before dms-saas. During workspace
141
- development dms-saas uses `workspace:*`; publishing replaces that range with
142
- the released interface version. Release the interface package first, then
140
+ The interface package must be released before dms-saas, which depends on it
141
+ through `>=<interface version> <1.0.0`; during workspace development pnpm
142
+ resolves that range to the sibling package. Release the interface package first,
143
+ then
143
144
  release dms-saas, and update consumers to the published interface version.
144
145
 
145
146
  ### Public screens
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-saas",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,25 +27,6 @@
27
27
  "provenance": true,
28
28
  "registry": "https://registry.npmjs.org/"
29
29
  },
30
- "scripts": {
31
- "build": "pnpm --filter @antelopejs/interface-dms-saas build && rimraf dist && tsc -p tsconfig.build.json",
32
- "test:frontend": "ajs-dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
33
- "frontend:dev": "cd playground && pnpm frontend:dev",
34
- "dev": "ajs project run -w -p playground",
35
- "stripe:webhooks": "stripe listen --forward-to localhost:5010/api/saas/webhooks/stripe",
36
- "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && cd frontend-vue && pnpm lint:fix",
37
- "lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint",
38
- "typecheck": "tsc -p tsconfig.json",
39
- "format": "oxfmt . && cd frontend-vue && pnpm format",
40
- "check:package-contract": "node scripts/check-package-contract.mjs",
41
- "verify:interface": "node scripts/verify-interface-package.cjs",
42
- "test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:package-contract && pnpm run check:package-contract && pnpm run test:unit",
43
- "test:unit": "vitest run",
44
- "release": "pnpm --filter @antelopejs/interface-dms-saas build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
45
- "prepack": "pnpm run build && pnpm run check:package-contract",
46
- "knip": "knip --dependencies",
47
- "knip:all": "knip"
48
- },
49
30
  "dependencies": {
50
31
  "@antelopejs/dms": ">=0.0.1 <1.0.0",
51
32
  "@antelopejs/interface-api": ">=0.0.13 <1.0.0",
@@ -55,7 +36,7 @@
55
36
  "@antelopejs/interface-database": ">=0.1.7 <1.0.0",
56
37
  "@antelopejs/interface-database-decorators": ">=0.1.6 <1.0.0",
57
38
  "@antelopejs/interface-dms": ">=0.0.1 <1.0.0",
58
- "@antelopejs/interface-dms-saas": "workspace:*",
39
+ "@antelopejs/interface-dms-saas": ">=0.0.2 <1.0.0",
59
40
  "@antelopejs/interface-file-storage": ">=0.1.3 <1.0.0",
60
41
  "node-cron": "^4.2.1",
61
42
  "stripe": "^17.5.0",
@@ -83,11 +64,28 @@
83
64
  "optionalDependencies": {
84
65
  "@antelopejs/interface-dms-automation": ">=0.0.1 <1.0.0"
85
66
  },
86
- "packageManager": "pnpm@10.2.0",
87
67
  "antelopeJs": {
88
68
  "baseUrl": "dist",
89
69
  "implements": [
90
70
  "@antelopejs/interface-dms-saas"
91
71
  ]
72
+ },
73
+ "scripts": {
74
+ "build": "pnpm --filter @antelopejs/interface-dms-saas build && rimraf dist && tsc -p tsconfig.build.json",
75
+ "test:frontend": "ajs-dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
76
+ "frontend:dev": "cd playground && pnpm frontend:dev",
77
+ "dev": "ajs project run -w -p playground",
78
+ "stripe:webhooks": "stripe listen --forward-to localhost:5010/api/saas/webhooks/stripe",
79
+ "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && cd frontend-vue && pnpm lint:fix",
80
+ "lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint",
81
+ "typecheck": "tsc -p tsconfig.json",
82
+ "format": "oxfmt . && cd frontend-vue && pnpm format",
83
+ "check:package-contract": "node scripts/check-package-contract.mjs",
84
+ "verify:interface": "node scripts/verify-interface-package.cjs",
85
+ "test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:package-contract && pnpm run check:package-contract && pnpm run test:unit",
86
+ "test:unit": "vitest run",
87
+ "release": "pnpm --filter @antelopejs/interface-dms-saas build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
88
+ "knip": "knip --dependencies",
89
+ "knip:all": "knip"
92
90
  }
93
- }
91
+ }
@@ -1,61 +0,0 @@
1
- interface FinalizeBody {
2
- tenant_assignment_token: string;
3
- workspaceName: string;
4
- planId: string;
5
- customerType: "individual" | "business";
6
- companyName?: string;
7
- vatNumber?: string;
8
- address?: {
9
- line1?: string;
10
- line2?: string;
11
- postalCode?: string;
12
- city?: string;
13
- state?: string;
14
- country?: string;
15
- };
16
- paymentMethodId: string;
17
- }
18
-
19
- interface FinalizeResponse {
20
- token_type: string;
21
- access_token: string;
22
- expires_in: number;
23
- refresh_token: string;
24
- user: {
25
- _id: string;
26
- email: string;
27
- name: string;
28
- language: string;
29
- isValidated: boolean;
30
- createdAt: Date;
31
- updatedAt: Date;
32
- };
33
- }
34
-
35
- export default defineEventHandler(async (event) => {
36
- const config = useRuntimeConfig();
37
- const baseURL = config.public.dms.baseURL;
38
- const body = (await readBody(event)) as FinalizeBody;
39
-
40
- try {
41
- const response = await $fetch<FinalizeResponse>(
42
- `/api/saas/register/finalize`,
43
- {
44
- baseURL,
45
- method: "POST",
46
- body,
47
- },
48
- );
49
-
50
- await replaceUserSession(event, {
51
- user: response.user,
52
- accessToken: response.access_token,
53
- refreshToken: response.refresh_token,
54
- activeTenantId: decodeJwtTenantId(response.access_token),
55
- });
56
-
57
- return response.user;
58
- } catch (error: unknown) {
59
- throwApiError(error);
60
- }
61
- });