apitally 0.15.1 → 0.15.3
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 +5 -10
- package/dist/adonisjs/configure.cjs +89 -0
- package/dist/adonisjs/configure.cjs.map +1 -0
- package/dist/adonisjs/configure.d.cts +9 -0
- package/dist/adonisjs/configure.d.ts +9 -0
- package/dist/adonisjs/configure.js +65 -0
- package/dist/adonisjs/configure.js.map +1 -0
- package/dist/adonisjs/index.cjs +64 -0
- package/dist/adonisjs/index.cjs.map +1 -1
- package/dist/adonisjs/index.d.cts +2 -0
- package/dist/adonisjs/index.d.ts +2 -0
- package/dist/adonisjs/index.js +60 -0
- package/dist/adonisjs/index.js.map +1 -1
- package/package.json +3 -4
- package/configure.ts +0 -35
- package/stubs/main.ts +0 -3
- /package/{stubs → dist/adonisjs/stubs}/config/apitally.stub +0 -0
package/README.md
CHANGED
|
@@ -205,23 +205,18 @@ _Note:_ Apitally only works with H3 v2 and currently doesn't support nested apps
|
|
|
205
205
|
|
|
206
206
|
### AdonisJS
|
|
207
207
|
|
|
208
|
-
You can use the
|
|
208
|
+
You can use the below Ace command to configure Apitally in your AdonisJS application:
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
|
-
node ace
|
|
211
|
+
node ace configure apitally/adonisjs
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
This command will automatically:
|
|
215
215
|
|
|
216
|
-
- Create
|
|
216
|
+
- Create a config file at `config/apitally.ts`
|
|
217
217
|
- Register the Apitally provider in `adonisrc.ts`
|
|
218
|
-
- Add the Apitally middleware to
|
|
219
|
-
- Add environment variables to `.env` and
|
|
220
|
-
|
|
221
|
-
After running the command, you'll need to:
|
|
222
|
-
|
|
223
|
-
- Set your `APITALLY_CLIENT_ID` in the `.env` file
|
|
224
|
-
- Modify our exception handler in `app/exceptions/handler.ts` to capture validation and server errors in Apitally
|
|
218
|
+
- Add the Apitally middleware to `start/kernel.ts`
|
|
219
|
+
- Add required environment variables to `.env` and `start/env.ts`
|
|
225
220
|
|
|
226
221
|
For further instructions, see our
|
|
227
222
|
[setup guide for AdonisJS](https://docs.apitally.io/frameworks/adonisjs).
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/adonisjs/configure.ts
|
|
22
|
+
var configure_exports = {};
|
|
23
|
+
__export(configure_exports, {
|
|
24
|
+
configure: () => configure
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(configure_exports);
|
|
27
|
+
var import_url = require("url");
|
|
28
|
+
|
|
29
|
+
// src/common/paramValidation.ts
|
|
30
|
+
function isValidClientId(clientId) {
|
|
31
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
32
|
+
return regexExp.test(clientId);
|
|
33
|
+
}
|
|
34
|
+
__name(isValidClientId, "isValidClientId");
|
|
35
|
+
function isValidEnv(env) {
|
|
36
|
+
const regexExp = /^[\w-]{1,32}$/;
|
|
37
|
+
return regexExp.test(env);
|
|
38
|
+
}
|
|
39
|
+
__name(isValidEnv, "isValidEnv");
|
|
40
|
+
|
|
41
|
+
// src/adonisjs/configure.ts
|
|
42
|
+
var import_meta = {};
|
|
43
|
+
var STUBS_ROOT = (0, import_url.fileURLToPath)(new URL("./stubs/", import_meta.url));
|
|
44
|
+
async function configure(command) {
|
|
45
|
+
const clientId = await command.prompt.ask("Apitally client ID", {
|
|
46
|
+
result(value) {
|
|
47
|
+
return value.trim().toLowerCase();
|
|
48
|
+
},
|
|
49
|
+
validate(value) {
|
|
50
|
+
return isValidClientId(value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const env = await command.prompt.ask("Environment name", {
|
|
54
|
+
default: "dev",
|
|
55
|
+
result(value) {
|
|
56
|
+
return value.trim().toLowerCase().replaceAll("_", "-").replaceAll(" ", "-");
|
|
57
|
+
},
|
|
58
|
+
validate(value) {
|
|
59
|
+
return isValidEnv(value);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const codemods = await command.createCodemods();
|
|
63
|
+
await codemods.makeUsingStub(STUBS_ROOT, "config/apitally.stub", {});
|
|
64
|
+
await codemods.registerMiddleware("router", [
|
|
65
|
+
{
|
|
66
|
+
path: "apitally/adonisjs/middleware"
|
|
67
|
+
}
|
|
68
|
+
]);
|
|
69
|
+
await codemods.updateRcFile((rcFile) => {
|
|
70
|
+
rcFile.addProvider("apitally/adonisjs/provider");
|
|
71
|
+
});
|
|
72
|
+
await codemods.defineEnvVariables({
|
|
73
|
+
APITALLY_CLIENT_ID: clientId,
|
|
74
|
+
APITALLY_ENV: env
|
|
75
|
+
});
|
|
76
|
+
await codemods.defineEnvValidations({
|
|
77
|
+
leadingComment: "Variables for configuring the apitally package",
|
|
78
|
+
variables: {
|
|
79
|
+
APITALLY_CLIENT_ID: "Env.schema.string()",
|
|
80
|
+
APITALLY_ENV: "Env.schema.string.optional()"
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
__name(configure, "configure");
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
configure
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=configure.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/adonisjs/configure.ts","../../src/common/paramValidation.ts"],"sourcesContent":["/**\n * Allows users to add Apitally to their AdonisJS application using the built-in Ace command.\n */\n\nimport type Configure from \"@adonisjs/core/commands/configure\";\nimport { fileURLToPath } from \"url\";\n\nimport { isValidClientId, isValidEnv } from \"../common/paramValidation.js\";\n\nconst STUBS_ROOT = fileURLToPath(new URL(\"./stubs/\", import.meta.url));\n\nexport async function configure(command: Configure) {\n const clientId = await command.prompt.ask(\"Apitally client ID\", {\n result(value) {\n return value.trim().toLowerCase();\n },\n validate(value) {\n return isValidClientId(value);\n },\n });\n const env = await command.prompt.ask(\"Environment name\", {\n default: \"dev\",\n result(value) {\n return value\n .trim()\n .toLowerCase()\n .replaceAll(\"_\", \"-\")\n .replaceAll(\" \", \"-\");\n },\n validate(value) {\n return isValidEnv(value);\n },\n });\n\n const codemods = await command.createCodemods();\n\n await codemods.makeUsingStub(STUBS_ROOT, \"config/apitally.stub\", {});\n\n await codemods.registerMiddleware(\"router\", [\n {\n path: \"apitally/adonisjs/middleware\",\n },\n ]);\n\n await codemods.updateRcFile((rcFile: any) => {\n rcFile.addProvider(\"apitally/adonisjs/provider\");\n });\n\n await codemods.defineEnvVariables({\n APITALLY_CLIENT_ID: clientId,\n APITALLY_ENV: env,\n });\n\n await codemods.defineEnvValidations({\n leadingComment: \"Variables for configuring the apitally package\",\n variables: {\n APITALLY_CLIENT_ID: \"Env.schema.string()\",\n APITALLY_ENV: \"Env.schema.string.optional()\",\n },\n });\n}\n","export function isValidClientId(clientId: string): boolean {\n const regexExp =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return regexExp.test(clientId);\n}\n\nexport function isValidEnv(env: string): boolean {\n const regexExp = /^[\\w-]{1,32}$/;\n return regexExp.test(env);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKA,iBAA8B;;;ACLvB,SAASA,gBAAgBC,UAAgB;AAC9C,QAAMC,WACJ;AACF,SAAOA,SAASC,KAAKF,QAAAA;AACvB;AAJgBD;AAMT,SAASI,WAAWC,KAAW;AACpC,QAAMH,WAAW;AACjB,SAAOA,SAASC,KAAKE,GAAAA;AACvB;AAHgBD;;;ADNhB;AASA,IAAME,iBAAaC,0BAAc,IAAIC,IAAI,YAAY,YAAYC,GAAG,CAAA;AAEpE,eAAsBC,UAAUC,SAAkB;AAChD,QAAMC,WAAW,MAAMD,QAAQE,OAAOC,IAAI,sBAAsB;IAC9DC,OAAOC,OAAK;AACV,aAAOA,MAAMC,KAAI,EAAGC,YAAW;IACjC;IACAC,SAASH,OAAK;AACZ,aAAOI,gBAAgBJ,KAAAA;IACzB;EACF,CAAA;AACA,QAAMK,MAAM,MAAMV,QAAQE,OAAOC,IAAI,oBAAoB;IACvDQ,SAAS;IACTP,OAAOC,OAAK;AACV,aAAOA,MACJC,KAAI,EACJC,YAAW,EACXK,WAAW,KAAK,GAAA,EAChBA,WAAW,KAAK,GAAA;IACrB;IACAJ,SAASH,OAAK;AACZ,aAAOQ,WAAWR,KAAAA;IACpB;EACF,CAAA;AAEA,QAAMS,WAAW,MAAMd,QAAQe,eAAc;AAE7C,QAAMD,SAASE,cAAcrB,YAAY,wBAAwB,CAAC,CAAA;AAElE,QAAMmB,SAASG,mBAAmB,UAAU;IAC1C;MACEC,MAAM;IACR;GACD;AAED,QAAMJ,SAASK,aAAa,CAACC,WAAAA;AAC3BA,WAAOC,YAAY,4BAAA;EACrB,CAAA;AAEA,QAAMP,SAASQ,mBAAmB;IAChCC,oBAAoBtB;IACpBuB,cAAcd;EAChB,CAAA;AAEA,QAAMI,SAASW,qBAAqB;IAClCC,gBAAgB;IAChBC,WAAW;MACTJ,oBAAoB;MACpBC,cAAc;IAChB;EACF,CAAA;AACF;AAjDsBzB;","names":["isValidClientId","clientId","regexExp","test","isValidEnv","env","STUBS_ROOT","fileURLToPath","URL","url","configure","command","clientId","prompt","ask","result","value","trim","toLowerCase","validate","isValidClientId","env","default","replaceAll","isValidEnv","codemods","createCodemods","makeUsingStub","registerMiddleware","path","updateRcFile","rcFile","addProvider","defineEnvVariables","APITALLY_CLIENT_ID","APITALLY_ENV","defineEnvValidations","leadingComment","variables"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/adonisjs/configure.ts
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
|
|
7
|
+
// src/common/paramValidation.ts
|
|
8
|
+
function isValidClientId(clientId) {
|
|
9
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
10
|
+
return regexExp.test(clientId);
|
|
11
|
+
}
|
|
12
|
+
__name(isValidClientId, "isValidClientId");
|
|
13
|
+
function isValidEnv(env) {
|
|
14
|
+
const regexExp = /^[\w-]{1,32}$/;
|
|
15
|
+
return regexExp.test(env);
|
|
16
|
+
}
|
|
17
|
+
__name(isValidEnv, "isValidEnv");
|
|
18
|
+
|
|
19
|
+
// src/adonisjs/configure.ts
|
|
20
|
+
var STUBS_ROOT = fileURLToPath(new URL("./stubs/", import.meta.url));
|
|
21
|
+
async function configure(command) {
|
|
22
|
+
const clientId = await command.prompt.ask("Apitally client ID", {
|
|
23
|
+
result(value) {
|
|
24
|
+
return value.trim().toLowerCase();
|
|
25
|
+
},
|
|
26
|
+
validate(value) {
|
|
27
|
+
return isValidClientId(value);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const env = await command.prompt.ask("Environment name", {
|
|
31
|
+
default: "dev",
|
|
32
|
+
result(value) {
|
|
33
|
+
return value.trim().toLowerCase().replaceAll("_", "-").replaceAll(" ", "-");
|
|
34
|
+
},
|
|
35
|
+
validate(value) {
|
|
36
|
+
return isValidEnv(value);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const codemods = await command.createCodemods();
|
|
40
|
+
await codemods.makeUsingStub(STUBS_ROOT, "config/apitally.stub", {});
|
|
41
|
+
await codemods.registerMiddleware("router", [
|
|
42
|
+
{
|
|
43
|
+
path: "apitally/adonisjs/middleware"
|
|
44
|
+
}
|
|
45
|
+
]);
|
|
46
|
+
await codemods.updateRcFile((rcFile) => {
|
|
47
|
+
rcFile.addProvider("apitally/adonisjs/provider");
|
|
48
|
+
});
|
|
49
|
+
await codemods.defineEnvVariables({
|
|
50
|
+
APITALLY_CLIENT_ID: clientId,
|
|
51
|
+
APITALLY_ENV: env
|
|
52
|
+
});
|
|
53
|
+
await codemods.defineEnvValidations({
|
|
54
|
+
leadingComment: "Variables for configuring the apitally package",
|
|
55
|
+
variables: {
|
|
56
|
+
APITALLY_CLIENT_ID: "Env.schema.string()",
|
|
57
|
+
APITALLY_ENV: "Env.schema.string.optional()"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
__name(configure, "configure");
|
|
62
|
+
export {
|
|
63
|
+
configure
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=configure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/adonisjs/configure.ts","../../src/common/paramValidation.ts"],"sourcesContent":["/**\n * Allows users to add Apitally to their AdonisJS application using the built-in Ace command.\n */\n\nimport type Configure from \"@adonisjs/core/commands/configure\";\nimport { fileURLToPath } from \"url\";\n\nimport { isValidClientId, isValidEnv } from \"../common/paramValidation.js\";\n\nconst STUBS_ROOT = fileURLToPath(new URL(\"./stubs/\", import.meta.url));\n\nexport async function configure(command: Configure) {\n const clientId = await command.prompt.ask(\"Apitally client ID\", {\n result(value) {\n return value.trim().toLowerCase();\n },\n validate(value) {\n return isValidClientId(value);\n },\n });\n const env = await command.prompt.ask(\"Environment name\", {\n default: \"dev\",\n result(value) {\n return value\n .trim()\n .toLowerCase()\n .replaceAll(\"_\", \"-\")\n .replaceAll(\" \", \"-\");\n },\n validate(value) {\n return isValidEnv(value);\n },\n });\n\n const codemods = await command.createCodemods();\n\n await codemods.makeUsingStub(STUBS_ROOT, \"config/apitally.stub\", {});\n\n await codemods.registerMiddleware(\"router\", [\n {\n path: \"apitally/adonisjs/middleware\",\n },\n ]);\n\n await codemods.updateRcFile((rcFile: any) => {\n rcFile.addProvider(\"apitally/adonisjs/provider\");\n });\n\n await codemods.defineEnvVariables({\n APITALLY_CLIENT_ID: clientId,\n APITALLY_ENV: env,\n });\n\n await codemods.defineEnvValidations({\n leadingComment: \"Variables for configuring the apitally package\",\n variables: {\n APITALLY_CLIENT_ID: \"Env.schema.string()\",\n APITALLY_ENV: \"Env.schema.string.optional()\",\n },\n });\n}\n","export function isValidClientId(clientId: string): boolean {\n const regexExp =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return regexExp.test(clientId);\n}\n\nexport function isValidEnv(env: string): boolean {\n const regexExp = /^[\\w-]{1,32}$/;\n return regexExp.test(env);\n}\n"],"mappings":";;;;AAKA,SAASA,qBAAqB;;;ACLvB,SAASC,gBAAgBC,UAAgB;AAC9C,QAAMC,WACJ;AACF,SAAOA,SAASC,KAAKF,QAAAA;AACvB;AAJgBD;AAMT,SAASI,WAAWC,KAAW;AACpC,QAAMH,WAAW;AACjB,SAAOA,SAASC,KAAKE,GAAAA;AACvB;AAHgBD;;;ADGhB,IAAME,aAAaC,cAAc,IAAIC,IAAI,YAAY,YAAYC,GAAG,CAAA;AAEpE,eAAsBC,UAAUC,SAAkB;AAChD,QAAMC,WAAW,MAAMD,QAAQE,OAAOC,IAAI,sBAAsB;IAC9DC,OAAOC,OAAK;AACV,aAAOA,MAAMC,KAAI,EAAGC,YAAW;IACjC;IACAC,SAASH,OAAK;AACZ,aAAOI,gBAAgBJ,KAAAA;IACzB;EACF,CAAA;AACA,QAAMK,MAAM,MAAMV,QAAQE,OAAOC,IAAI,oBAAoB;IACvDQ,SAAS;IACTP,OAAOC,OAAK;AACV,aAAOA,MACJC,KAAI,EACJC,YAAW,EACXK,WAAW,KAAK,GAAA,EAChBA,WAAW,KAAK,GAAA;IACrB;IACAJ,SAASH,OAAK;AACZ,aAAOQ,WAAWR,KAAAA;IACpB;EACF,CAAA;AAEA,QAAMS,WAAW,MAAMd,QAAQe,eAAc;AAE7C,QAAMD,SAASE,cAAcrB,YAAY,wBAAwB,CAAC,CAAA;AAElE,QAAMmB,SAASG,mBAAmB,UAAU;IAC1C;MACEC,MAAM;IACR;GACD;AAED,QAAMJ,SAASK,aAAa,CAACC,WAAAA;AAC3BA,WAAOC,YAAY,4BAAA;EACrB,CAAA;AAEA,QAAMP,SAASQ,mBAAmB;IAChCC,oBAAoBtB;IACpBuB,cAAcd;EAChB,CAAA;AAEA,QAAMI,SAASW,qBAAqB;IAClCC,gBAAgB;IAChBC,WAAW;MACTJ,oBAAoB;MACpBC,cAAc;IAChB;EACF,CAAA;AACF;AAjDsBzB;","names":["fileURLToPath","isValidClientId","clientId","regexExp","test","isValidEnv","env","STUBS_ROOT","fileURLToPath","URL","url","configure","command","clientId","prompt","ask","result","value","trim","toLowerCase","validate","isValidClientId","env","default","replaceAll","isValidEnv","codemods","createCodemods","makeUsingStub","registerMiddleware","path","updateRcFile","rcFile","addProvider","defineEnvVariables","APITALLY_CLIENT_ID","APITALLY_ENV","defineEnvValidations","leadingComment","variables"]}
|
package/dist/adonisjs/index.cjs
CHANGED
|
@@ -22,9 +22,72 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var adonisjs_exports = {};
|
|
23
23
|
__export(adonisjs_exports, {
|
|
24
24
|
captureError: () => captureError,
|
|
25
|
+
configure: () => configure,
|
|
25
26
|
defineConfig: () => defineConfig
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(adonisjs_exports);
|
|
29
|
+
|
|
30
|
+
// src/adonisjs/configure.ts
|
|
31
|
+
var import_url = require("url");
|
|
32
|
+
|
|
33
|
+
// src/common/paramValidation.ts
|
|
34
|
+
function isValidClientId(clientId) {
|
|
35
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
36
|
+
return regexExp.test(clientId);
|
|
37
|
+
}
|
|
38
|
+
__name(isValidClientId, "isValidClientId");
|
|
39
|
+
function isValidEnv(env) {
|
|
40
|
+
const regexExp = /^[\w-]{1,32}$/;
|
|
41
|
+
return regexExp.test(env);
|
|
42
|
+
}
|
|
43
|
+
__name(isValidEnv, "isValidEnv");
|
|
44
|
+
|
|
45
|
+
// src/adonisjs/configure.ts
|
|
46
|
+
var import_meta = {};
|
|
47
|
+
var STUBS_ROOT = (0, import_url.fileURLToPath)(new URL("./stubs/", import_meta.url));
|
|
48
|
+
async function configure(command) {
|
|
49
|
+
const clientId = await command.prompt.ask("Apitally client ID", {
|
|
50
|
+
result(value) {
|
|
51
|
+
return value.trim().toLowerCase();
|
|
52
|
+
},
|
|
53
|
+
validate(value) {
|
|
54
|
+
return isValidClientId(value);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const env = await command.prompt.ask("Environment name", {
|
|
58
|
+
default: "dev",
|
|
59
|
+
result(value) {
|
|
60
|
+
return value.trim().toLowerCase().replaceAll("_", "-").replaceAll(" ", "-");
|
|
61
|
+
},
|
|
62
|
+
validate(value) {
|
|
63
|
+
return isValidEnv(value);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const codemods = await command.createCodemods();
|
|
67
|
+
await codemods.makeUsingStub(STUBS_ROOT, "config/apitally.stub", {});
|
|
68
|
+
await codemods.registerMiddleware("router", [
|
|
69
|
+
{
|
|
70
|
+
path: "apitally/adonisjs/middleware"
|
|
71
|
+
}
|
|
72
|
+
]);
|
|
73
|
+
await codemods.updateRcFile((rcFile) => {
|
|
74
|
+
rcFile.addProvider("apitally/adonisjs/provider");
|
|
75
|
+
});
|
|
76
|
+
await codemods.defineEnvVariables({
|
|
77
|
+
APITALLY_CLIENT_ID: clientId,
|
|
78
|
+
APITALLY_ENV: env
|
|
79
|
+
});
|
|
80
|
+
await codemods.defineEnvValidations({
|
|
81
|
+
leadingComment: "Variables for configuring the apitally package",
|
|
82
|
+
variables: {
|
|
83
|
+
APITALLY_CLIENT_ID: "Env.schema.string()",
|
|
84
|
+
APITALLY_ENV: "Env.schema.string.optional()"
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
__name(configure, "configure");
|
|
89
|
+
|
|
90
|
+
// src/adonisjs/index.ts
|
|
28
91
|
function defineConfig(config) {
|
|
29
92
|
return config;
|
|
30
93
|
}
|
|
@@ -38,6 +101,7 @@ __name(captureError, "captureError");
|
|
|
38
101
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
102
|
0 && (module.exports = {
|
|
40
103
|
captureError,
|
|
104
|
+
configure,
|
|
41
105
|
defineConfig
|
|
42
106
|
});
|
|
43
107
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adonisjs/index.ts"],"sourcesContent":["import type { HttpContext } from \"@adonisjs/core/http\";\n\nimport type { ApitallyConfig } from \"../common/types.js\";\nexport type { ApitallyConfig, ApitallyConsumer } from \"../common/types.js\";\n\nexport function defineConfig(config: ApitallyConfig) {\n return config;\n}\n\nexport function captureError(error: unknown, ctx: HttpContext) {\n if (error instanceof Error) {\n ctx.apitallyError = error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/adonisjs/index.ts","../../src/adonisjs/configure.ts","../../src/common/paramValidation.ts"],"sourcesContent":["import type { HttpContext } from \"@adonisjs/core/http\";\n\nimport type { ApitallyConfig } from \"../common/types.js\";\nexport type { ApitallyConfig, ApitallyConsumer } from \"../common/types.js\";\nexport { configure } from \"./configure.js\";\n\nexport function defineConfig(config: ApitallyConfig) {\n return config;\n}\n\nexport function captureError(error: unknown, ctx: HttpContext) {\n if (error instanceof Error) {\n ctx.apitallyError = error;\n }\n}\n","/**\n * Allows users to add Apitally to their AdonisJS application using the built-in Ace command.\n */\n\nimport type Configure from \"@adonisjs/core/commands/configure\";\nimport { fileURLToPath } from \"url\";\n\nimport { isValidClientId, isValidEnv } from \"../common/paramValidation.js\";\n\nconst STUBS_ROOT = fileURLToPath(new URL(\"./stubs/\", import.meta.url));\n\nexport async function configure(command: Configure) {\n const clientId = await command.prompt.ask(\"Apitally client ID\", {\n result(value) {\n return value.trim().toLowerCase();\n },\n validate(value) {\n return isValidClientId(value);\n },\n });\n const env = await command.prompt.ask(\"Environment name\", {\n default: \"dev\",\n result(value) {\n return value\n .trim()\n .toLowerCase()\n .replaceAll(\"_\", \"-\")\n .replaceAll(\" \", \"-\");\n },\n validate(value) {\n return isValidEnv(value);\n },\n });\n\n const codemods = await command.createCodemods();\n\n await codemods.makeUsingStub(STUBS_ROOT, \"config/apitally.stub\", {});\n\n await codemods.registerMiddleware(\"router\", [\n {\n path: \"apitally/adonisjs/middleware\",\n },\n ]);\n\n await codemods.updateRcFile((rcFile: any) => {\n rcFile.addProvider(\"apitally/adonisjs/provider\");\n });\n\n await codemods.defineEnvVariables({\n APITALLY_CLIENT_ID: clientId,\n APITALLY_ENV: env,\n });\n\n await codemods.defineEnvValidations({\n leadingComment: \"Variables for configuring the apitally package\",\n variables: {\n APITALLY_CLIENT_ID: \"Env.schema.string()\",\n APITALLY_ENV: \"Env.schema.string.optional()\",\n },\n });\n}\n","export function isValidClientId(clientId: string): boolean {\n const regexExp =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return regexExp.test(clientId);\n}\n\nexport function isValidEnv(env: string): boolean {\n const regexExp = /^[\\w-]{1,32}$/;\n return regexExp.test(env);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;ACCA,iBAA8B;;;ACLvB,SAASA,gBAAgBC,UAAgB;AAC9C,QAAMC,WACJ;AACF,SAAOA,SAASC,KAAKF,QAAAA;AACvB;AAJgBD;AAMT,SAASI,WAAWC,KAAW;AACpC,QAAMH,WAAW;AACjB,SAAOA,SAASC,KAAKE,GAAAA;AACvB;AAHgBD;;;ADNhB;AASA,IAAME,iBAAaC,0BAAc,IAAIC,IAAI,YAAY,YAAYC,GAAG,CAAA;AAEpE,eAAsBC,UAAUC,SAAkB;AAChD,QAAMC,WAAW,MAAMD,QAAQE,OAAOC,IAAI,sBAAsB;IAC9DC,OAAOC,OAAK;AACV,aAAOA,MAAMC,KAAI,EAAGC,YAAW;IACjC;IACAC,SAASH,OAAK;AACZ,aAAOI,gBAAgBJ,KAAAA;IACzB;EACF,CAAA;AACA,QAAMK,MAAM,MAAMV,QAAQE,OAAOC,IAAI,oBAAoB;IACvDQ,SAAS;IACTP,OAAOC,OAAK;AACV,aAAOA,MACJC,KAAI,EACJC,YAAW,EACXK,WAAW,KAAK,GAAA,EAChBA,WAAW,KAAK,GAAA;IACrB;IACAJ,SAASH,OAAK;AACZ,aAAOQ,WAAWR,KAAAA;IACpB;EACF,CAAA;AAEA,QAAMS,WAAW,MAAMd,QAAQe,eAAc;AAE7C,QAAMD,SAASE,cAAcrB,YAAY,wBAAwB,CAAC,CAAA;AAElE,QAAMmB,SAASG,mBAAmB,UAAU;IAC1C;MACEC,MAAM;IACR;GACD;AAED,QAAMJ,SAASK,aAAa,CAACC,WAAAA;AAC3BA,WAAOC,YAAY,4BAAA;EACrB,CAAA;AAEA,QAAMP,SAASQ,mBAAmB;IAChCC,oBAAoBtB;IACpBuB,cAAcd;EAChB,CAAA;AAEA,QAAMI,SAASW,qBAAqB;IAClCC,gBAAgB;IAChBC,WAAW;MACTJ,oBAAoB;MACpBC,cAAc;IAChB;EACF,CAAA;AACF;AAjDsBzB;;;ADLf,SAAS6B,aAAaC,QAAsB;AACjD,SAAOA;AACT;AAFgBD;AAIT,SAASE,aAAaC,OAAgBC,KAAgB;AAC3D,MAAID,iBAAiBE,OAAO;AAC1BD,QAAIE,gBAAgBH;EACtB;AACF;AAJgBD;","names":["isValidClientId","clientId","regexExp","test","isValidEnv","env","STUBS_ROOT","fileURLToPath","URL","url","configure","command","clientId","prompt","ask","result","value","trim","toLowerCase","validate","isValidClientId","env","default","replaceAll","isValidEnv","codemods","createCodemods","makeUsingStub","registerMiddleware","path","updateRcFile","rcFile","addProvider","defineEnvVariables","APITALLY_CLIENT_ID","APITALLY_ENV","defineEnvValidations","leadingComment","variables","defineConfig","config","captureError","error","ctx","Error","apitallyError"]}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { HttpContext } from '@adonisjs/core/http';
|
|
2
2
|
import { ApitallyConfig } from '../common/types.cjs';
|
|
3
3
|
export { ApitallyConsumer } from '../common/types.cjs';
|
|
4
|
+
export { configure } from './configure.cjs';
|
|
4
5
|
import '../common/logging.cjs';
|
|
5
6
|
import 'winston';
|
|
6
7
|
import '../common/requestLogger.cjs';
|
|
7
8
|
import 'buffer';
|
|
8
9
|
import 'http';
|
|
9
10
|
import '../common/tempGzipFile.cjs';
|
|
11
|
+
import '@adonisjs/core/commands/configure';
|
|
10
12
|
|
|
11
13
|
declare function defineConfig(config: ApitallyConfig): ApitallyConfig;
|
|
12
14
|
declare function captureError(error: unknown, ctx: HttpContext): void;
|
package/dist/adonisjs/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { HttpContext } from '@adonisjs/core/http';
|
|
2
2
|
import { ApitallyConfig } from '../common/types.js';
|
|
3
3
|
export { ApitallyConsumer } from '../common/types.js';
|
|
4
|
+
export { configure } from './configure.js';
|
|
4
5
|
import '../common/logging.js';
|
|
5
6
|
import 'winston';
|
|
6
7
|
import '../common/requestLogger.js';
|
|
7
8
|
import 'buffer';
|
|
8
9
|
import 'http';
|
|
9
10
|
import '../common/tempGzipFile.js';
|
|
11
|
+
import '@adonisjs/core/commands/configure';
|
|
10
12
|
|
|
11
13
|
declare function defineConfig(config: ApitallyConfig): ApitallyConfig;
|
|
12
14
|
declare function captureError(error: unknown, ctx: HttpContext): void;
|
package/dist/adonisjs/index.js
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
+
// src/adonisjs/configure.ts
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
|
|
7
|
+
// src/common/paramValidation.ts
|
|
8
|
+
function isValidClientId(clientId) {
|
|
9
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
10
|
+
return regexExp.test(clientId);
|
|
11
|
+
}
|
|
12
|
+
__name(isValidClientId, "isValidClientId");
|
|
13
|
+
function isValidEnv(env) {
|
|
14
|
+
const regexExp = /^[\w-]{1,32}$/;
|
|
15
|
+
return regexExp.test(env);
|
|
16
|
+
}
|
|
17
|
+
__name(isValidEnv, "isValidEnv");
|
|
18
|
+
|
|
19
|
+
// src/adonisjs/configure.ts
|
|
20
|
+
var STUBS_ROOT = fileURLToPath(new URL("./stubs/", import.meta.url));
|
|
21
|
+
async function configure(command) {
|
|
22
|
+
const clientId = await command.prompt.ask("Apitally client ID", {
|
|
23
|
+
result(value) {
|
|
24
|
+
return value.trim().toLowerCase();
|
|
25
|
+
},
|
|
26
|
+
validate(value) {
|
|
27
|
+
return isValidClientId(value);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const env = await command.prompt.ask("Environment name", {
|
|
31
|
+
default: "dev",
|
|
32
|
+
result(value) {
|
|
33
|
+
return value.trim().toLowerCase().replaceAll("_", "-").replaceAll(" ", "-");
|
|
34
|
+
},
|
|
35
|
+
validate(value) {
|
|
36
|
+
return isValidEnv(value);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const codemods = await command.createCodemods();
|
|
40
|
+
await codemods.makeUsingStub(STUBS_ROOT, "config/apitally.stub", {});
|
|
41
|
+
await codemods.registerMiddleware("router", [
|
|
42
|
+
{
|
|
43
|
+
path: "apitally/adonisjs/middleware"
|
|
44
|
+
}
|
|
45
|
+
]);
|
|
46
|
+
await codemods.updateRcFile((rcFile) => {
|
|
47
|
+
rcFile.addProvider("apitally/adonisjs/provider");
|
|
48
|
+
});
|
|
49
|
+
await codemods.defineEnvVariables({
|
|
50
|
+
APITALLY_CLIENT_ID: clientId,
|
|
51
|
+
APITALLY_ENV: env
|
|
52
|
+
});
|
|
53
|
+
await codemods.defineEnvValidations({
|
|
54
|
+
leadingComment: "Variables for configuring the apitally package",
|
|
55
|
+
variables: {
|
|
56
|
+
APITALLY_CLIENT_ID: "Env.schema.string()",
|
|
57
|
+
APITALLY_ENV: "Env.schema.string.optional()"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
__name(configure, "configure");
|
|
62
|
+
|
|
4
63
|
// src/adonisjs/index.ts
|
|
5
64
|
function defineConfig(config) {
|
|
6
65
|
return config;
|
|
@@ -14,6 +73,7 @@ function captureError(error, ctx) {
|
|
|
14
73
|
__name(captureError, "captureError");
|
|
15
74
|
export {
|
|
16
75
|
captureError,
|
|
76
|
+
configure,
|
|
17
77
|
defineConfig
|
|
18
78
|
};
|
|
19
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adonisjs/index.ts"],"sourcesContent":["import type { HttpContext } from \"@adonisjs/core/http\";\n\nimport type { ApitallyConfig } from \"../common/types.js\";\nexport type { ApitallyConfig, ApitallyConsumer } from \"../common/types.js\";\n\nexport function defineConfig(config: ApitallyConfig) {\n return config;\n}\n\nexport function captureError(error: unknown, ctx: HttpContext) {\n if (error instanceof Error) {\n ctx.apitallyError = error;\n }\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../../src/adonisjs/configure.ts","../../src/common/paramValidation.ts","../../src/adonisjs/index.ts"],"sourcesContent":["/**\n * Allows users to add Apitally to their AdonisJS application using the built-in Ace command.\n */\n\nimport type Configure from \"@adonisjs/core/commands/configure\";\nimport { fileURLToPath } from \"url\";\n\nimport { isValidClientId, isValidEnv } from \"../common/paramValidation.js\";\n\nconst STUBS_ROOT = fileURLToPath(new URL(\"./stubs/\", import.meta.url));\n\nexport async function configure(command: Configure) {\n const clientId = await command.prompt.ask(\"Apitally client ID\", {\n result(value) {\n return value.trim().toLowerCase();\n },\n validate(value) {\n return isValidClientId(value);\n },\n });\n const env = await command.prompt.ask(\"Environment name\", {\n default: \"dev\",\n result(value) {\n return value\n .trim()\n .toLowerCase()\n .replaceAll(\"_\", \"-\")\n .replaceAll(\" \", \"-\");\n },\n validate(value) {\n return isValidEnv(value);\n },\n });\n\n const codemods = await command.createCodemods();\n\n await codemods.makeUsingStub(STUBS_ROOT, \"config/apitally.stub\", {});\n\n await codemods.registerMiddleware(\"router\", [\n {\n path: \"apitally/adonisjs/middleware\",\n },\n ]);\n\n await codemods.updateRcFile((rcFile: any) => {\n rcFile.addProvider(\"apitally/adonisjs/provider\");\n });\n\n await codemods.defineEnvVariables({\n APITALLY_CLIENT_ID: clientId,\n APITALLY_ENV: env,\n });\n\n await codemods.defineEnvValidations({\n leadingComment: \"Variables for configuring the apitally package\",\n variables: {\n APITALLY_CLIENT_ID: \"Env.schema.string()\",\n APITALLY_ENV: \"Env.schema.string.optional()\",\n },\n });\n}\n","export function isValidClientId(clientId: string): boolean {\n const regexExp =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return regexExp.test(clientId);\n}\n\nexport function isValidEnv(env: string): boolean {\n const regexExp = /^[\\w-]{1,32}$/;\n return regexExp.test(env);\n}\n","import type { HttpContext } from \"@adonisjs/core/http\";\n\nimport type { ApitallyConfig } from \"../common/types.js\";\nexport type { ApitallyConfig, ApitallyConsumer } from \"../common/types.js\";\nexport { configure } from \"./configure.js\";\n\nexport function defineConfig(config: ApitallyConfig) {\n return config;\n}\n\nexport function captureError(error: unknown, ctx: HttpContext) {\n if (error instanceof Error) {\n ctx.apitallyError = error;\n }\n}\n"],"mappings":";;;;AAKA,SAASA,qBAAqB;;;ACLvB,SAASC,gBAAgBC,UAAgB;AAC9C,QAAMC,WACJ;AACF,SAAOA,SAASC,KAAKF,QAAAA;AACvB;AAJgBD;AAMT,SAASI,WAAWC,KAAW;AACpC,QAAMH,WAAW;AACjB,SAAOA,SAASC,KAAKE,GAAAA;AACvB;AAHgBD;;;ADGhB,IAAME,aAAaC,cAAc,IAAIC,IAAI,YAAY,YAAYC,GAAG,CAAA;AAEpE,eAAsBC,UAAUC,SAAkB;AAChD,QAAMC,WAAW,MAAMD,QAAQE,OAAOC,IAAI,sBAAsB;IAC9DC,OAAOC,OAAK;AACV,aAAOA,MAAMC,KAAI,EAAGC,YAAW;IACjC;IACAC,SAASH,OAAK;AACZ,aAAOI,gBAAgBJ,KAAAA;IACzB;EACF,CAAA;AACA,QAAMK,MAAM,MAAMV,QAAQE,OAAOC,IAAI,oBAAoB;IACvDQ,SAAS;IACTP,OAAOC,OAAK;AACV,aAAOA,MACJC,KAAI,EACJC,YAAW,EACXK,WAAW,KAAK,GAAA,EAChBA,WAAW,KAAK,GAAA;IACrB;IACAJ,SAASH,OAAK;AACZ,aAAOQ,WAAWR,KAAAA;IACpB;EACF,CAAA;AAEA,QAAMS,WAAW,MAAMd,QAAQe,eAAc;AAE7C,QAAMD,SAASE,cAAcrB,YAAY,wBAAwB,CAAC,CAAA;AAElE,QAAMmB,SAASG,mBAAmB,UAAU;IAC1C;MACEC,MAAM;IACR;GACD;AAED,QAAMJ,SAASK,aAAa,CAACC,WAAAA;AAC3BA,WAAOC,YAAY,4BAAA;EACrB,CAAA;AAEA,QAAMP,SAASQ,mBAAmB;IAChCC,oBAAoBtB;IACpBuB,cAAcd;EAChB,CAAA;AAEA,QAAMI,SAASW,qBAAqB;IAClCC,gBAAgB;IAChBC,WAAW;MACTJ,oBAAoB;MACpBC,cAAc;IAChB;EACF,CAAA;AACF;AAjDsBzB;;;AELf,SAAS6B,aAAaC,QAAsB;AACjD,SAAOA;AACT;AAFgBD;AAIT,SAASE,aAAaC,OAAgBC,KAAgB;AAC3D,MAAID,iBAAiBE,OAAO;AAC1BD,QAAIE,gBAAgBH;EACtB;AACF;AAJgBD;","names":["fileURLToPath","isValidClientId","clientId","regexExp","test","isValidEnv","env","STUBS_ROOT","fileURLToPath","URL","url","configure","command","clientId","prompt","ask","result","value","trim","toLowerCase","validate","isValidClientId","env","default","replaceAll","isValidEnv","codemods","createCodemods","makeUsingStub","registerMiddleware","path","updateRcFile","rcFile","addProvider","defineEnvVariables","APITALLY_CLIENT_ID","APITALLY_ENV","defineEnvValidations","leadingComment","variables","defineConfig","config","captureError","error","ctx","Error","apitallyError"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apitally",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Simple API monitoring & analytics for REST APIs built with Express, Fastify, Hono, H3, Koa, and NestJS.",
|
|
5
5
|
"author": "Apitally <hello@apitally.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,15 +35,13 @@
|
|
|
35
35
|
"homepage": "https://apitally.io",
|
|
36
36
|
"type": "module",
|
|
37
37
|
"scripts": {
|
|
38
|
-
"build": "tsup
|
|
38
|
+
"build": "tsup",
|
|
39
39
|
"format": "prettier --write .",
|
|
40
40
|
"check": "tsc --noEmit && eslint src tests && prettier --check .",
|
|
41
41
|
"test": "vitest"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist/",
|
|
45
|
-
"stubs/",
|
|
46
|
-
"configure.ts",
|
|
47
45
|
"LICENSE",
|
|
48
46
|
"README.md"
|
|
49
47
|
],
|
|
@@ -251,6 +249,7 @@
|
|
|
251
249
|
"celebrate": "^15.0.3",
|
|
252
250
|
"class-transformer": "^0.5.1",
|
|
253
251
|
"class-validator": "^0.14.0",
|
|
252
|
+
"copyfiles": "^2.4.1",
|
|
254
253
|
"eslint": "^9.0.0",
|
|
255
254
|
"express": "^5.1.0",
|
|
256
255
|
"express-validator": "^7.2.1",
|
package/configure.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Allows users to add Apitally to their AdonisJS application using the built-in Ace command.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type Configure from "@adonisjs/core/commands/configure";
|
|
6
|
-
import { stubsRoot } from "./stubs/main.js";
|
|
7
|
-
|
|
8
|
-
export async function configure(command: Configure) {
|
|
9
|
-
const codemods = await command.createCodemods();
|
|
10
|
-
|
|
11
|
-
await codemods.makeUsingStub(stubsRoot, "config/apitally.stub", {});
|
|
12
|
-
|
|
13
|
-
await codemods.registerMiddleware("router", [
|
|
14
|
-
{
|
|
15
|
-
path: "apitally/adonisjs/middleware",
|
|
16
|
-
},
|
|
17
|
-
]);
|
|
18
|
-
|
|
19
|
-
await codemods.updateRcFile((rcFile) => {
|
|
20
|
-
rcFile.addProvider("apitally/adonisjs/provider");
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
await codemods.defineEnvVariables({
|
|
24
|
-
APITALLY_CLIENT_ID: "",
|
|
25
|
-
APITALLY_ENV: "dev",
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
await codemods.defineEnvValidations({
|
|
29
|
-
leadingComment: "Variables for configuring the apitally package",
|
|
30
|
-
variables: {
|
|
31
|
-
APITALLY_CLIENT_ID: "Env.schema.string()",
|
|
32
|
-
APITALLY_ENV: "Env.schema.string.optional()",
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
}
|
package/stubs/main.ts
DELETED
|
File without changes
|