@antelopejs/dms 0.17.0 → 0.18.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/CHANGELOG.md +34 -0
- package/README.md +4 -8
- package/dist/config/internal/state.d.ts +2 -2
- package/dist/config/internal/state.js.map +1 -1
- package/dist/utils/sign-in-country.d.ts +0 -1
- package/dist/utils/sign-in-country.js +7 -17
- package/dist/utils/sign-in-country.js.map +1 -1
- package/frontend-vue/layers/dms-layout/app/composables/layout/usePageHeaderActions.ts +1 -1
- package/frontend-vue/package.json +1 -1
- package/frontend-vue/scripts/check-autoimport-boundaries.mjs +19 -3
- package/frontend-vue/scripts/test-autoimport-boundaries.mjs +19 -0
- package/package.json +5 -5
- package/data/NOTICE.md +0 -12
- package/data/dbip-country-lite.mmdb +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.18.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.17.0...v0.18.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **dms:** Read the sign-in country without a bundled database ([#776](https://github.com/AntelopeJS/dms/pull/776))
|
|
10
|
+
|
|
11
|
+
### 🩹 Fixes
|
|
12
|
+
|
|
13
|
+
- **dms-layout:** Re-export usePageHeaderActions by relative path so unimport scans it ([#777](https://github.com/AntelopeJS/dms/pull/777))
|
|
14
|
+
|
|
15
|
+
### 📖 Documentation
|
|
16
|
+
|
|
17
|
+
- **dms:** Explain what the AntelopeJS agent plugin unlocks, External database included ([#773](https://github.com/AntelopeJS/dms/pull/773))
|
|
18
|
+
- **dms:** Mark the ResourceForm mode and the source tables in the docs examples ([#780](https://github.com/AntelopeJS/dms/pull/780))
|
|
19
|
+
|
|
20
|
+
### 📦 Build
|
|
21
|
+
|
|
22
|
+
- **deps:** Bump @antelopejs packages to the 2026-11-06 releases ([#781](https://github.com/AntelopeJS/dms/pull/781))
|
|
23
|
+
|
|
24
|
+
### 🏡 Chore
|
|
25
|
+
|
|
26
|
+
- **dms:** Commit the module locks the test runs record ([#775](https://github.com/AntelopeJS/dms/pull/775))
|
|
27
|
+
- **ci:** Remove the weekly mutation caller ([#778](https://github.com/AntelopeJS/dms/pull/778))
|
|
28
|
+
|
|
29
|
+
### 🤖 CI
|
|
30
|
+
|
|
31
|
+
- Call ci-node.yml@v1 ([#779](https://github.com/AntelopeJS/dms/pull/779))
|
|
32
|
+
|
|
33
|
+
### ❤️ Contributors
|
|
34
|
+
|
|
35
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
36
|
+
|
|
3
37
|
## v0.17.0
|
|
4
38
|
|
|
5
39
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.16.2...v0.17.0)
|
package/README.md
CHANGED
|
@@ -79,15 +79,15 @@ export class SalesPage extends PageController("sales", {
|
|
|
79
79
|
|
|
80
80
|
| Package | Supported | Tested with |
|
|
81
81
|
| ------------------------------------------- | ------------------ | ----------- |
|
|
82
|
-
| `@antelopejs/core` | `>=1.
|
|
82
|
+
| `@antelopejs/core` | `>=1.21.0 <2` | `1.21.0` |
|
|
83
83
|
| `@antelopejs/interface-api` | `>=0.2.0 <1.0.0` | `0.2.0` |
|
|
84
84
|
| `@antelopejs/interface-api-util` | `>=0.3.0 <1.0.0` | `0.3.0` |
|
|
85
85
|
| `@antelopejs/interface-core` | `>=0.4.0 <1.0.0` | `0.4.0` |
|
|
86
86
|
| `@antelopejs/interface-data-api` | `>=0.6.0 <1.0.0` | `0.6.0` |
|
|
87
|
-
| `@antelopejs/interface-database` | `>=0.3.0 <1.0.0` | `0.3.
|
|
88
|
-
| `@antelopejs/interface-database-decorators` | `>=0.2.0 <1.0.0` | `0.2.
|
|
87
|
+
| `@antelopejs/interface-database` | `>=0.3.0 <1.0.0` | `0.3.1` |
|
|
88
|
+
| `@antelopejs/interface-database-decorators` | `>=0.2.0 <1.0.0` | `0.2.1` |
|
|
89
89
|
| `@antelopejs/interface-dms` | `>=0.12.0 <0.13.0` | `0.12.0` |
|
|
90
|
-
| `@antelopejs/interface-dms-automation` | `>=0.6.0 <1.0.0` | `0.6.
|
|
90
|
+
| `@antelopejs/interface-dms-automation` | `>=0.6.0 <1.0.0` | `0.6.1` |
|
|
91
91
|
| `@antelopejs/interface-email` | `>=0.0.6 <1.0.0` | `0.0.6` |
|
|
92
92
|
| `@antelopejs/interface-file-storage` | `>=0.1.4 <1.0.0` | `0.1.4` |
|
|
93
93
|
| `@antelopejs/interface-redis` | `>=0.0.9 <1.0.0` | `0.0.9` |
|
|
@@ -114,10 +114,6 @@ The package ships the core Claude Code skills (`dms`, `dms-auth`, `dms-best-prac
|
|
|
114
114
|
|
|
115
115
|
This package lives in the [`AntelopeJS/dms`](https://github.com/AntelopeJS/dms) pnpm workspace, next to `@antelopejs/interface-dms`. Read [CONTRIBUTING.md](https://github.com/AntelopeJS/dms/blob/main/CONTRIBUTING.md) and the [repository README](https://github.com/AntelopeJS/dms#contributing) for the development commands.
|
|
116
116
|
|
|
117
|
-
## Third-party data
|
|
118
|
-
|
|
119
|
-
The package ships the DB-IP IP to Country Lite database (`data/`) to tell which country a sign-in came from. It is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/): IP Geolocation by [DB-IP](https://db-ip.com). `pnpm country-database` downloads the current edition; packing the package for a release runs it.
|
|
120
|
-
|
|
121
117
|
## License
|
|
122
118
|
|
|
123
119
|
[Apache-2.0](./LICENSE)
|
|
@@ -12,8 +12,8 @@ export interface OAuthConfig {
|
|
|
12
12
|
callbackBaseUrl?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface SignInCountryConfig {
|
|
15
|
-
header?: string;
|
|
16
|
-
database?: string
|
|
15
|
+
header?: string | false;
|
|
16
|
+
database?: string;
|
|
17
17
|
}
|
|
18
18
|
export interface AuthConfig {
|
|
19
19
|
jwtSecret: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/config/internal/state.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/config/internal/state.ts"],"names":[],"mappings":";;;AAqRA,8BAEC;AAQD,gEAEC;AAED,kDAEC;AAED,4CAEC;AAGD,4CAEC;AAED,sCAEC;AAMD,oDAMC;AAED,sCAEC;AAED,kDAEC;AAED,4CAEC;AAED,8CAEC;AAED,wCAEC;AAMD,kCAkBC;AAzWD,+BAA4B;AAE5B,wEAKuD;AA6NvD,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC1B,QAAA,6BAA6B,GAAG,4BAAqB,CAAC;AAEnE,IAAI,gBAAgB,GAAe;IACjC,SAAS,EAAE,EAAE;IACb,4BAA4B,EAAE,2BAAoB;IAClD,4BAA4B,EAAE,2BAAoB;IAClD,mBAAmB,EAAE,qCAA6B;IAClD,oBAAoB,EAAE,2BAA2B,GAAG,2BAAoB;IACxE,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,KAAK;CACzB,CAAC;AAEF,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEzC,IAAI,sBAAsB,GAAqB;IAC7C,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAClB,8BAA8B,GAAG,8BAAuB;IAC1D,cAAc,EAAE,uCAAuC;CACxD,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAC5B,QAAA,uBAAuB,GAClC,4BAA4B,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAE3E,IAAI,mBAAmB,GAAkB;IACvC,OAAO,EAAE,+BAAuB;IAChC,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,IAAI,oBAAoB,GAAmB;IACzC,gBAAgB,EAAE,MAA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BAAsB,CAAC;AAChC,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,SAAgB,iBAAiB;IAC/B,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,SAAgB,cAAc;IAC5B,OAAO,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC;AAClC,CAAC;AAMD,SAAgB,WAAW,CAAC,MAAc;IACxC,YAAY,GAAG,IAAA,WAAI,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAE1C,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,gBAAgB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,sBAAsB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,mBAAmB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,oBAAoB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;IACrE,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BUNDLED_COUNTRY_DATABASE = void 0;
|
|
7
3
|
exports.resetCountryLookup = resetCountryLookup;
|
|
8
4
|
exports.normalizeCountryCode = normalizeCountryCode;
|
|
9
5
|
exports.lookupCountry = lookupCountry;
|
|
@@ -11,34 +7,27 @@ exports.resolveClientOrigin = resolveClientOrigin;
|
|
|
11
7
|
exports.countryDisplayName = countryDisplayName;
|
|
12
8
|
const own_value_1 = require("./own-value");
|
|
13
9
|
const node_fs_1 = require("node:fs");
|
|
14
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
15
10
|
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
16
11
|
const mmdb_lib_1 = require("mmdb-lib");
|
|
17
12
|
const config_1 = require("../config");
|
|
18
13
|
const FALLBACK_LANGUAGE = "en";
|
|
19
14
|
const COUNTRY_CODE_PATTERN = /^[A-Z]{2}$/;
|
|
20
15
|
const NON_COUNTRY_CODES = new Set(["XX", "T1"]);
|
|
21
|
-
|
|
16
|
+
const DEFAULT_COUNTRY_HEADER = "CF-IPCountry";
|
|
22
17
|
let cachedLookup;
|
|
23
|
-
function databasePath() {
|
|
24
|
-
const configured = (0, config_1.getAuthConfig)().signInCountry?.database;
|
|
25
|
-
if (configured === false)
|
|
26
|
-
return undefined;
|
|
27
|
-
return configured ?? exports.BUNDLED_COUNTRY_DATABASE;
|
|
28
|
-
}
|
|
29
18
|
function openDatabase(file) {
|
|
30
19
|
try {
|
|
31
20
|
return new mmdb_lib_1.Reader((0, node_fs_1.readFileSync)(file));
|
|
32
21
|
}
|
|
33
22
|
catch (error) {
|
|
34
|
-
logging_1.Logging.Warn(`[DMS]
|
|
23
|
+
logging_1.Logging.Warn(`[DMS] Cannot read the sign-in country database \`auth.signInCountry.database\` names ("${file}"): without the header, sign-ins are told apart by device only (${String(error)})`);
|
|
35
24
|
return null;
|
|
36
25
|
}
|
|
37
26
|
}
|
|
38
27
|
function countryLookup() {
|
|
39
28
|
if (cachedLookup !== undefined)
|
|
40
29
|
return cachedLookup;
|
|
41
|
-
const file =
|
|
30
|
+
const file = (0, config_1.getAuthConfig)().signInCountry?.database;
|
|
42
31
|
cachedLookup = file ? openDatabase(file) : null;
|
|
43
32
|
return cachedLookup;
|
|
44
33
|
}
|
|
@@ -66,9 +55,10 @@ function lookupCountry(ip, lookup = countryLookup()) {
|
|
|
66
55
|
}
|
|
67
56
|
}
|
|
68
57
|
function resolveClientOrigin(ip, headers) {
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
58
|
+
const config = (0, config_1.getAuthConfig)().signInCountry;
|
|
59
|
+
const header = config?.header ?? (config?.database ? undefined : DEFAULT_COUNTRY_HEADER);
|
|
60
|
+
const country = (header
|
|
61
|
+
? normalizeCountryCode((0, own_value_1.ownValue)(headers, header.toLowerCase()))
|
|
72
62
|
: undefined) ?? lookupCountry(ip);
|
|
73
63
|
return { ip, country };
|
|
74
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in-country.js","sourceRoot":"","sources":["../../src/utils/sign-in-country.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sign-in-country.js","sourceRoot":"","sources":["../../src/utils/sign-in-country.ts"],"names":[],"mappings":";;AAoDA,gDAEC;AAID,oDASC;AAQD,sCAUC;AAUD,kDAYC;AAiBD,gDAKC;AAjID,2CAAuC;AACvC,qCAAuC;AACvC,gEAA6D;AAC7D,uCAAwD;AACxD,sCAA0C;AAE1C,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAE1C,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAMrE,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAe9C,IAAI,YAA8C,CAAC;AAEnD,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,IAAI,iBAAM,CAAkB,IAAA,sBAAY,EAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iBAAO,CAAC,IAAI,CACV,0FAA0F,IAAI,mEAAmE,MAAM,CAAC,KAAK,CAAC,GAAG,C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,EACV,OAAuB;IAEvB,MAAM,MAAM,GAAG,IAAA,sBAAa,GAAE,CAAC,aAAa,CAAC;IAC7C,MAAM,MAAM,GACV,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC;IAC5E,MAAM,OAAO,GACX,CAAC,MAAM;QACL,CAAC,CAAC,oBAAoB,CAAC,IAAA,oBAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,QAA4B;IAClD,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AASD,SAAgB,kBAAkB,CAAC,IAAY,EAAE,QAAiB;IAChE,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QAC5D,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "
|
|
1
|
+
export * from "../../../../dms-ui/app/composables/layout/usePageHeaderActions";
|
|
@@ -71,8 +71,24 @@ function own(name, file, registry = owners) {
|
|
|
71
71
|
entries.add(file);
|
|
72
72
|
registry.set(name, entries);
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const unresolved = [];
|
|
75
|
+
const warn = console.warn;
|
|
76
|
+
console.warn = (...args) => {
|
|
77
|
+
const message = args.join(" ");
|
|
78
|
+
if (message.startsWith("[unimport]")) unresolved.push(message);
|
|
79
|
+
else warn(...args);
|
|
80
|
+
};
|
|
81
|
+
let scanned;
|
|
82
|
+
try {
|
|
83
|
+
scanned = await scanDirExports(globs);
|
|
84
|
+
} finally {
|
|
85
|
+
console.warn = warn;
|
|
86
|
+
}
|
|
87
|
+
for (const message of unresolved) {
|
|
88
|
+
console.error(`FAIL auto-import scan ${message}`);
|
|
89
|
+
process.exitCode = 1;
|
|
90
|
+
}
|
|
91
|
+
for (const item of scanned) own(item.as ?? item.name, item.from);
|
|
76
92
|
const registry = ts.createSourceFile(
|
|
77
93
|
"registry.ts",
|
|
78
94
|
readFileSync(join(frontend, "dms.frontend.ts"), "utf8"),
|
|
@@ -271,7 +287,7 @@ for (const file of program.getSourceFiles()) {
|
|
|
271
287
|
visit(file);
|
|
272
288
|
}
|
|
273
289
|
if (failures) process.exitCode = 1;
|
|
274
|
-
else
|
|
290
|
+
else if (!unresolved.length)
|
|
275
291
|
console.log(
|
|
276
292
|
`PASS frontend generated auto-import and template owners (${owners.size} providers)`,
|
|
277
293
|
);
|
|
@@ -139,6 +139,25 @@ try {
|
|
|
139
139
|
assert.equal(autoResult.status, 1, autoResult.stderr);
|
|
140
140
|
assert.match(autoResult.stderr, /useHigher/);
|
|
141
141
|
console.log("PASS reject generated auto-import owner");
|
|
142
|
+
rmSync(join(pkg, "layers"), { recursive: true, force: true });
|
|
143
|
+
mkdirSync(join(pkg, app), { recursive: true });
|
|
144
|
+
write(
|
|
145
|
+
"layers/dms-ui/app/composables/useShared.ts",
|
|
146
|
+
"export const useShared = () => 1;",
|
|
147
|
+
);
|
|
148
|
+
write(
|
|
149
|
+
"layers/dms-layout/app/composables/useShared.ts",
|
|
150
|
+
'export * from "../../../dms-ui/app/composables/useShared";',
|
|
151
|
+
);
|
|
152
|
+
assert.equal(run().status, 0, "relative star re-export resolves");
|
|
153
|
+
write(
|
|
154
|
+
"layers/dms-layout/app/composables/useShared.ts",
|
|
155
|
+
'export * from "#dms-ui/app/composables/useShared";',
|
|
156
|
+
);
|
|
157
|
+
const aliasResult = run();
|
|
158
|
+
assert.equal(aliasResult.status, 1, aliasResult.stderr);
|
|
159
|
+
assert.match(aliasResult.stderr, /FAIL auto-import scan .*#dms-ui/);
|
|
160
|
+
console.log("PASS reject unresolvable star re-export");
|
|
142
161
|
} finally {
|
|
143
162
|
rmSync(scratch, { recursive: true, force: true });
|
|
144
163
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "AntelopeJS DMS. Plug in your PostgreSQL, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"!frontend-vue/pnpm-workspace.yaml",
|
|
54
54
|
"skills",
|
|
55
55
|
"data",
|
|
56
|
+
"!data/*.mmdb",
|
|
56
57
|
"package.json",
|
|
57
58
|
"README.md",
|
|
58
59
|
"CHANGELOG.md",
|
|
@@ -93,8 +94,8 @@
|
|
|
93
94
|
"zod": "~3.24.2"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
|
-
"@antelopejs/core": ">=1.
|
|
97
|
-
"@antelopejs/tooling-configs": "0.
|
|
97
|
+
"@antelopejs/core": ">=1.21.0 <2",
|
|
98
|
+
"@antelopejs/tooling-configs": "^0.3.3",
|
|
98
99
|
"@types/archiver": "^6.0.4",
|
|
99
100
|
"@types/chai": "^4.3.20",
|
|
100
101
|
"@types/jsonwebtoken": "^9.0.10",
|
|
@@ -142,7 +143,7 @@
|
|
|
142
143
|
"@antelopejs/interface-redis": ">=0.0.9 <1.0.0"
|
|
143
144
|
},
|
|
144
145
|
"peerDependencies": {
|
|
145
|
-
"@antelopejs/core": ">=1.
|
|
146
|
+
"@antelopejs/core": ">=1.21.0 <2"
|
|
146
147
|
},
|
|
147
148
|
"peerDependenciesMeta": {
|
|
148
149
|
"@antelopejs/core": {
|
|
@@ -161,7 +162,6 @@
|
|
|
161
162
|
"test:integration": "node scripts/unless-prebuilt.mjs pnpm run build && DMS_TEST_DIR=dist/test/integration NODE_OPTIONS=\"${NODE_OPTIONS:+$NODE_OPTIONS }--require=\\\"$PWD/scripts/backend-runtime-boundaries.cjs\\\"\" ajs module test .",
|
|
162
163
|
"test:watch": "tsc -w & tsc-alias -w",
|
|
163
164
|
"release": "pnpm --filter @antelopejs/interface-dms build && pnpm --dir frontend-vue install --frozen-lockfile && release-it",
|
|
164
|
-
"country-database": "node scripts/fetch-country-database.mjs",
|
|
165
165
|
"knip": "knip --dependencies",
|
|
166
166
|
"knip:all": "knip",
|
|
167
167
|
"docs:catalog": "node scripts/docs-catalog.mjs",
|
package/data/NOTICE.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Third-party data
|
|
2
|
-
|
|
3
|
-
`dbip-country-lite.mmdb` is the [DB-IP](https://db-ip.com) IP to Country Lite
|
|
4
|
-
database, licensed under the
|
|
5
|
-
[Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
|
|
6
|
-
|
|
7
|
-
IP Geolocation by [DB-IP](https://db-ip.com).
|
|
8
|
-
|
|
9
|
-
The file is not kept in the repository: `scripts/fetch-country-database.mjs`
|
|
10
|
-
downloads the current edition when the package is packed for a release. The DMS
|
|
11
|
-
reads it to tell which country a sign-in came from; see `auth.signInCountry` in
|
|
12
|
-
the configuration reference.
|
|
Binary file
|