@sealcode/sealgen 0.11.5 → 0.11.6

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/lib/build.js CHANGED
@@ -110,7 +110,6 @@ async function build_ts() {
110
110
  }
111
111
  async function complex_build(watch) {
112
112
  const loader = Object.fromEntries(["png", "svg", "jpg", "gif", "jpeg", "otf", "ttf"].map((ext) => ["." + ext, "file"]));
113
- console.log({ loader });
114
113
  let css_build = await (0, esbuild_1.context)({
115
114
  entryPoints: ["./src/main.css"],
116
115
  sourcemap: true,
@@ -62,22 +62,9 @@ class StatefulPage extends mountable_1.Mountable {
62
62
  // the "$" key is parsed as dot notation and overrides the state
63
63
  const original_state = JSON.parse((0, base64_1.from_base64)(ctx.$body.state));
64
64
  const modified_state = (0, deepmerge_1.default)(original_state, ctx.$body.$ || {}, {
65
- arrayMerge: (target, source, options) => {
65
+ arrayMerge: (_target, source, _options) => {
66
66
  // https://github.com/TehShrike/deepmerge#user-content-arraymerge-example-combine-arrays
67
- const destination = target.slice();
68
- source.forEach((item, index) => {
69
- if (typeof destination[index] === "undefined") {
70
- destination[index] =
71
- options.cloneUnlessOtherwiseSpecified(item, options);
72
- }
73
- else if (options.isMergeableObject(item)) {
74
- destination[index] = (0, deepmerge_1.default)(target[index], item, options);
75
- }
76
- else if (target.indexOf(item) === -1) {
77
- destination.push(item);
78
- }
79
- });
80
- return destination;
67
+ return source;
81
68
  },
82
69
  });
83
70
  if (ctx.$body.action && ctx.$body.args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
package/src/build.ts CHANGED
@@ -124,7 +124,6 @@ async function complex_build(watch: boolean): Promise<void> {
124
124
  (ext) => <const>["." + ext, "file"]
125
125
  )
126
126
  );
127
- console.log({ loader });
128
127
  let css_build: BuildContext = await context({
129
128
  entryPoints: ["./src/main.css"],
130
129
  sourcemap: true,
@@ -128,31 +128,12 @@ export abstract class StatefulPage<
128
128
 
129
129
  const modified_state = deepmerge(original_state, ctx.$body.$ || {}, {
130
130
  arrayMerge: (
131
- target: any[],
131
+ _target: any[],
132
132
  source: any[],
133
- options: ArrayMergeOptions
133
+ _options: ArrayMergeOptions
134
134
  ) => {
135
135
  // https://github.com/TehShrike/deepmerge#user-content-arraymerge-example-combine-arrays
136
- const destination = target.slice();
137
-
138
- source.forEach((item, index) => {
139
- if (typeof destination[index] === "undefined") {
140
- destination[index] =
141
- options.cloneUnlessOtherwiseSpecified(
142
- item,
143
- options
144
- );
145
- } else if (options.isMergeableObject(item)) {
146
- destination[index] = deepmerge(
147
- target[index],
148
- item,
149
- options
150
- );
151
- } else if (target.indexOf(item) === -1) {
152
- destination.push(item);
153
- }
154
- });
155
- return destination;
136
+ return source;
156
137
  },
157
138
  }) as State;
158
139