@andersbakken/fisk 3.5.0 → 3.5.2

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.
@@ -0,0 +1,67 @@
1
+ import fs from "fs";
2
+ import babel from "@rollup/plugin-babel";
3
+ import child_process from "child_process";
4
+ import commonjs from "@rollup/plugin-commonjs";
5
+ import replace from "@rollup/plugin-replace";
6
+ import resolve from "@rollup/plugin-node-resolve";
7
+ import typescript from "rollup-plugin-typescript2";
8
+ import { terser } from "rollup-plugin-terser";
9
+ import ttypescript from "ttypescript";
10
+
11
+ const external = [];
12
+
13
+ let builds = [];
14
+
15
+ const targets = [ "daemon" ];
16
+ const inputs = [ "./daemon/fisk-daemon.ts" ];
17
+ for (let idx = 0; idx < targets.length; ++idx) {
18
+ const target = targets[idx];
19
+ const input = inputs[idx];
20
+ const sourceMap = sourceMaps[idx];
21
+ let output = `dist/${target}.js`;
22
+ try {
23
+ fs.unlinkSync(output);
24
+ fs.unlinkSync(output + ".map");
25
+ } catch (err) {}
26
+
27
+ const plugins = [
28
+ resolve({
29
+ preferBuiltins: false
30
+ }),
31
+ commonjs(),
32
+ typescript({
33
+ tsconfig: `tsconfig.json`,
34
+ cacheRoot: ".cache",
35
+ typescript: ttypescript,
36
+ }),
37
+ babel({
38
+ exclude: "node_modules/**",
39
+ babelrc: false,
40
+ inputSourceMap: sourceMap,
41
+ sourceMaps: sourceMap,
42
+ babelHelpers: "bundled",
43
+ extensions: [".js", ".ts"],
44
+ plugins: [
45
+ ...(remove ? ["./scripts/babel-plugin-remove"] : []),
46
+ ["babel-plugin-transform-async-to-promises", { hoist: true }]
47
+ ]
48
+ }),
49
+ ...(minify ? [terser()] : [])
50
+ ];
51
+
52
+ builds.push({
53
+ input,
54
+ plugins,
55
+ external,
56
+ onwarn,
57
+ output: {
58
+ file: output,
59
+ format,
60
+ name: project,
61
+ exports: "named",
62
+ sourcemap: sourceMap ? (debug ? "inline" : true) : false
63
+ }
64
+ });
65
+ }
66
+
67
+ export default builds;
@@ -703,15 +703,21 @@ server.on("builder", builder => {
703
703
  });
704
704
 
705
705
  builder.on("objectCache", msg => {
706
- objectCache.addNode(builder, msg);
706
+ if (objectCache) {
707
+ objectCache.addNode(builder, msg);
708
+ }
707
709
  });
708
710
 
709
711
  builder.on("objectCacheAdded", msg => {
710
- objectCache.insert(msg, builder);
712
+ if (objectCache) {
713
+ objectCache.insert(msg, builder);
714
+ }
711
715
  });
712
716
 
713
717
  builder.on("objectCacheRemoved", msg => {
714
- objectCache.remove(msg, builder);
718
+ if (objectCache) {
719
+ objectCache.remove(msg, builder);
720
+ }
715
721
  });
716
722
 
717
723
  builder.on("close", () => {
package/tsconfig.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "exclude": ["**/.*/", "examples/**", "autobahn/**", "node_modules/**", "dist/**", "*.def.ts"],
3
+ "compilerOptions": {
4
+ "target": "es2020",
5
+ "typeRoots": ["./src/typings", "./node_modules/@nf-types"],
6
+ "noUncheckedIndexedAccess": true,
7
+ "strictBindCallApply": true,
8
+ "newLine": "LF",
9
+ "module": "es6",
10
+ "declaration": false,
11
+ "moduleResolution": "node",
12
+ "pretty": true,
13
+ "noImplicitAny": true,
14
+ "esModuleInterop": true,
15
+ "strictNullChecks": true,
16
+ "strictPropertyInitialization": true,
17
+ "downlevelIteration": true,
18
+ "strict": true,
19
+ "sourceMap": true,
20
+ "incremental": true,
21
+ "lib": ["es2019"],
22
+ "baseUrl": ".",
23
+ "paths": {
24
+ "~/*": ["src/*"]
25
+ },
26
+ "plugins": [{ "transform": "@zerollup/ts-transform-paths" }]
27
+ }
28
+ }