@flag-engine/core 0.0.1
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/eslint.config.mjs +12 -0
- package/package.json +46 -0
- package/rollup.config.mjs +33 -0
- package/tsconfig.json +18 -0
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flag-engine/core",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "Feature flags evaluation engine, runtime agnostic",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"require": "./dist/index.cjs.js",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "rollup -c rollup.config.mjs",
|
|
19
|
+
"start": "tsx src/index.ts",
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"coverage": "vitest run --coverage",
|
|
22
|
+
"lint": "eslint ."
|
|
23
|
+
},
|
|
24
|
+
"keywords": [],
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^9.12.0",
|
|
29
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
30
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
31
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
32
|
+
"@types/eslint__js": "^8.42.3",
|
|
33
|
+
"@types/murmurhash-js": "^1.0.6",
|
|
34
|
+
"@vitest/coverage-v8": "2.1.2",
|
|
35
|
+
"eslint": "^9.12.0",
|
|
36
|
+
"rollup": "^4.24.0",
|
|
37
|
+
"tslib": "^2.7.0",
|
|
38
|
+
"tsx": "^4.19.1",
|
|
39
|
+
"typescript": "^5.6.2",
|
|
40
|
+
"typescript-eslint": "^8.8.1",
|
|
41
|
+
"vitest": "^2.1.2"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"murmurhash-js": "^1.0.0"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import typescript from "@rollup/plugin-typescript";
|
|
2
|
+
import terser from "@rollup/plugin-terser";
|
|
3
|
+
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
4
|
+
|
|
5
|
+
const external = ["murmurhash-js"];
|
|
6
|
+
const globals = { "murmurhash-js": "murmurhash-js" };
|
|
7
|
+
|
|
8
|
+
export default () => {
|
|
9
|
+
return {
|
|
10
|
+
input: "src/index.ts",
|
|
11
|
+
output: [
|
|
12
|
+
{
|
|
13
|
+
file: "dist/index.cjs.js",
|
|
14
|
+
format: "cjs",
|
|
15
|
+
name: "ff-engine",
|
|
16
|
+
globals,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
file: "dist/index.mjs",
|
|
20
|
+
format: "es",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
plugins: [
|
|
24
|
+
nodeResolve(),
|
|
25
|
+
typescript({
|
|
26
|
+
tsconfig: "./tsconfig.json",
|
|
27
|
+
sourceMap: true,
|
|
28
|
+
}),
|
|
29
|
+
terser(),
|
|
30
|
+
],
|
|
31
|
+
external,
|
|
32
|
+
};
|
|
33
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext", // Target the latest ECMAScript standard for optimal ESM support.
|
|
4
|
+
"module": "ESNext", // Output ES Modules.
|
|
5
|
+
"moduleResolution": "Node", // Use Node module resolution strategy.
|
|
6
|
+
"strict": true, // Enable strict type-checking.
|
|
7
|
+
"esModuleInterop": true, // Enable interoperability between CommonJS and ES modules.
|
|
8
|
+
"skipLibCheck": true, // Skip type checking of all declaration files for faster builds.
|
|
9
|
+
"declaration": true, // Generate declaration files (.d.ts).
|
|
10
|
+
"declarationMap": true, // Generate sourcemaps for declaration files.
|
|
11
|
+
"sourceMap": true, // Enable sourcemaps for debugging.
|
|
12
|
+
"outDir": "dist", // Output directory for compiled files.
|
|
13
|
+
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export.
|
|
14
|
+
"forceConsistentCasingInFileNames": true, // Enforce consistent file casing.
|
|
15
|
+
"noEmit": false
|
|
16
|
+
},
|
|
17
|
+
"exclude": ["node_modules", "dist"] // Exclude node_modules and dist from compilation.
|
|
18
|
+
}
|