actionview-svelte-handler 0.6.0 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c662bff173e3c32b2785f35eec52ac42e05abb82e6572c900ecaf86dae1d8ac
4
- data.tar.gz: a076f194d83d7742d76483d8ab789f283838589b2fb728386123dd070523592e
3
+ metadata.gz: fa87ed29fb4384fb377c10cf448128bc375891b09f4c4e5cc27e9ed61cca05f8
4
+ data.tar.gz: 29a5cc3725715e988248c8a34ff81828455ead0d654006ca9beced87a4654017
5
5
  SHA512:
6
- metadata.gz: 83ca34a75800e1eab54d46885932a4a70e2828aec25f2b98177955ac357811f3024516826c438902fa177333b1f1504286f39dd83ffe6f539e54bd2a6d915e94
7
- data.tar.gz: 264abb20627100eb9e4ed8f5f2417a752c12a397bc77494f6583a2dceb48aed2bbe5b25eac9d0174787cc7992f9df4dfb5113be06ab274205f21d99b9b3409b0
6
+ metadata.gz: ef8416ff83fcfb265e32508a18f6461d360312384c1b230717cce0913e646939d014683ee86df0e25e5ad48d51720192b084693d835b70eb9456d617058cb59d
7
+ data.tar.gz: 2c1af7eda9cfed6602c2aa7d2994efd94a535d75812a018348ec32bea9028a66474763f53bf0b0c6d249c456b6be848156dfca72b01cf8d33312eee1139139f6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- actionview-svelte-handler (0.6.0)
4
+ actionview-svelte-handler (0.8.0)
5
5
  rails (~> 7.0)
6
6
  zeitwerk (~> 2)
7
7
 
@@ -1,9 +1,9 @@
1
1
  module Svelte
2
2
  class InstallGenerator < Rails::Generators::Base
3
3
  desc "This generator installs actionview-svelte-handler"
4
-
4
+
5
5
  source_root File.expand_path("templates/install", __dir__)
6
-
6
+
7
7
  def install
8
8
  copy_file "initializer.rb", "config/initializers/svelte.rb"
9
9
  insert_into_file "app/views/layouts/application.html.erb",
@@ -13,4 +13,4 @@ module Svelte
13
13
  `npm install`
14
14
  end
15
15
  end
16
- end
16
+ end
data/lib/svelte/errors.rb CHANGED
@@ -4,44 +4,45 @@ module Svelte
4
4
  module Errors
5
5
  class CompilerError < ActiveSupport::SyntaxErrorProxy # steep:ignore UnknownConstant
6
6
  attr_accessor :location, :suggestion, :template
7
-
8
- def initialize(message, location)
9
- @location = location
10
- @sugggestion = @location.dig(:suggestion) || ""
7
+
8
+ def initialize(error)
9
+ @file = error[:id]
10
+ @line = error.dig(:start, :line)
11
+ @sugggestion = error.dig(:suggestion) || ""
11
12
  # steep:ignore:start
12
- super(message) # : self
13
+ super(error[:pluginCode]) # : self
13
14
  # steep:ignore:end
14
15
  end
15
-
16
+
16
17
  def message
17
18
  to_s
18
19
  end
19
-
20
+
20
21
  def backtrace
21
22
  if suggestion
22
- ["#{Rails.root.join location[:file]}:#{location[:line]}:#{message}, #{suggestion}"] + caller
23
+ ["#{Rails.root.join @file}:#{@line}:#{message}, #{suggestion}"] + caller
23
24
  else
24
- ["#{Rails.root.join location[:file]}:#{location[:line]}:#{message}"] + caller
25
+ ["#{Rails.root.join @file}:#{@line}:#{message}"] + caller
25
26
  end
26
27
  end
27
-
28
+
28
29
  def cause
29
30
  nil
30
31
  end
31
-
32
+
32
33
  def bindings
33
34
  [template.send(:binding)]
34
35
  end
35
-
36
+
36
37
  def backtrace_locations
37
38
  traces = backtrace.map { |trace|
38
39
  file, line = trace.match(/^(.+?):(\d+).*$/, &:captures) || trace
39
40
  ActiveSupport::SyntaxErrorProxy::BacktraceLocation.new(file, line.to_i, trace) # steep:ignore UnknownConstant
40
41
  }
41
-
42
+
42
43
  traces.map { |loc| ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy.new(loc, self) } # steep:ignore UnknownConstant
43
44
  end
44
-
45
+
45
46
  def annotated_source_code
46
47
  location[:lineText].split("\n").map.with_index(1) { |line, index|
47
48
  indentation = " " * 4
@@ -49,48 +50,48 @@ module Svelte
49
50
  }
50
51
  end
51
52
  end
52
-
53
+
53
54
  class TemplateError < StandardError
54
55
  attr_reader :cause, :template
55
-
56
+
56
57
  SOURCE_CODE_RADIUS = 3
57
-
58
+
58
59
  def initialize(template, error)
59
60
  raise("Did not provide cause error") unless error
60
61
  @cause = error
61
-
62
+
62
63
  raise("Did not provide template") unless template
63
64
  @template, @sub_templates = template, nil
64
-
65
+
65
66
  raise("Cause error is nil for TemplateError") unless @cause
66
67
  @cause.template = template
67
-
68
+
68
69
  # steep:ignore:start
69
70
  super(@cause.message) # : self
70
71
  # steep:ignore:end
71
72
  end
72
-
73
+
73
74
  def message
74
75
  @cause.message
75
76
  end
76
-
77
+
77
78
  def annotated_source_code
78
79
  @cause.annotated_source_code
79
80
  end
80
-
81
+
81
82
  # Following is copypasta-ed from ActionView::Template::Error
82
83
  def backtrace
83
84
  @cause.backtrace
84
85
  end
85
-
86
+
86
87
  def backtrace_locations
87
88
  @cause.backtrace_locations
88
89
  end
89
-
90
+
90
91
  def file_name
91
92
  @template.identifier
92
93
  end
93
-
94
+
94
95
  def sub_template_message
95
96
  if @sub_templates
96
97
  "Trace of template inclusion: " +
@@ -99,27 +100,27 @@ module Svelte
99
100
  ""
100
101
  end
101
102
  end
102
-
103
+
103
104
  def source_extract(indentation = 0)
104
105
  return [] unless (num = line_number)
105
106
  num = num.to_i
106
-
107
+
107
108
  source_code = @template.encode!.split("\n")
108
-
109
+
109
110
  start_on_line = [num - SOURCE_CODE_RADIUS - 1, 0].max
110
111
  end_on_line = [num + SOURCE_CODE_RADIUS - 1, source_code.length].min
111
-
112
+
112
113
  indent = end_on_line.to_s.size + indentation
113
114
  return [] unless (source_code = source_code[start_on_line..end_on_line])
114
-
115
+
115
116
  formatted_code_for(source_code, start_on_line, indent)
116
117
  end
117
-
118
+
118
119
  def sub_template_of(template_path)
119
120
  @sub_templates ||= []
120
121
  @sub_templates << template_path
121
122
  end
122
-
123
+
123
124
  def line_number
124
125
  @line_number ||=
125
126
  if file_name
@@ -127,9 +128,9 @@ module Svelte
127
128
  $1 if message =~ regexp || backtrace.find { |line| line =~ regexp }
128
129
  end
129
130
  end
130
-
131
+
131
132
  private
132
-
133
+
133
134
  def source_location
134
135
  if line_number
135
136
  "on line ##{line_number} of "
@@ -137,7 +138,7 @@ module Svelte
137
138
  "in "
138
139
  end + file_name
139
140
  end
140
-
141
+
141
142
  def formatted_code_for(source_code, line_counter, indent)
142
143
  raise("line counter is nil") if line_counter.nil?
143
144
  indent_template = "%#{indent}s: %s"
@@ -149,5 +150,3 @@ module Svelte
149
150
  end
150
151
  end
151
152
  end
152
-
153
- # {:id=>"", :location=>{:column=>13, :file=>"demo/e.html.svelte", :length=>3, :line=>7, :lineText=>"<h1>{hola}, {nam}</h1>", :namespace=>"file", :suggestion=>""}, :notes=>[], :pluginName=>"esbuild-svelte", :text=>"'nam' is not defined"}
@@ -35,6 +35,7 @@ module Svelte
35
35
 
36
36
  assembler.write(ERB.new(File.read('#{Svelte.gem_dir}/lib/svelte/templates/assembler.js.erb')).result_with_hash({
37
37
  path: '#{Rails.root.join template.identifier}',
38
+ digest: '#{digest}',
38
39
  locals: local_assigns,
39
40
  compiled_client: j(Rails.cache.read('svelte/template/client' + '#{digest}')),
40
41
  compiled_server: j(Rails.cache.read('svelte/template/server' + '#{digest}')),
@@ -42,11 +43,11 @@ module Svelte
42
43
  }))
43
44
 
44
45
  assembler.rewind
45
-
46
+
46
47
  result = JSON.parse(`NODE_PATH=#{Rails.root.join("node_modules")} NODE_NO_WARNINGS=1 node --experimental-vm-modules \#{assembler.path}`).deep_symbolize_keys
47
48
 
48
49
  if result[:error]
49
- e = Svelte::Errors::CompilerError.new(result.dig(:error, :text), result.dig(:error, :location))
50
+ e = Svelte::Errors::CompilerError.new(result.dig(:error))
50
51
  raise Svelte::Errors::TemplateError.new(template, e)
51
52
  end
52
53
 
@@ -4,9 +4,6 @@ module Svelte
4
4
  def svelte_tags
5
5
  js = <<-JS
6
6
  import "https://esm.sh/@11ty/is-land";
7
- import { readable } from "https://esm.sh/svelte/store"
8
-
9
- window.props = readable(JSON.parse("#{j(Svelte.props.to_json)}"))
10
7
  JS
11
8
 
12
9
  ((content_for(:head).presence || "") + "\n" + tag.script(js.html_safe, type: "module")).html_safe # steep:ignore RequiredBlockMissing
@@ -4,10 +4,8 @@
4
4
  DO NOT MODIFY.
5
5
  */
6
6
 
7
- import { readable } from "svelte/store";
8
7
  import { importFromStringSync } from "module-from-string";
9
8
  import { sveltePreprocess } from "svelte-preprocess";
10
- import * as recast from "recast";
11
9
  import { rollup } from "rollup";
12
10
  import svelte from "rollup-plugin-svelte";
13
11
  import alias from "@rollup/plugin-alias";
@@ -15,6 +13,7 @@ import commonjs from "@rollup/plugin-commonjs";
15
13
  import { nodeResolve } from "@rollup/plugin-node-resolve";
16
14
  import virtual from "@rollup/plugin-virtual";
17
15
  import swc from "@rollup/plugin-swc";
16
+ import path from "node:path";
18
17
  class Builder {
19
18
  path;
20
19
  props;
@@ -24,9 +23,12 @@ class Builder {
24
23
  workingDir;
25
24
  preprocess;
26
25
  pathAliases;
27
- constructor(path, props, locals, client, server, ssr, workingDir, preprocess, pathAliases) {
28
- this.path = path;
29
- this.props = readable(Object.assign(props, locals, props));
26
+ root;
27
+ digest;
28
+ constructor(path2, root, props, locals, client, server, ssr, workingDir, preprocess, pathAliases, digest) {
29
+ this.path = path2;
30
+ this.root = root;
31
+ this.props = Object.assign(props, props, locals);
30
32
  this.locals = locals;
31
33
  this.compiled = {
32
34
  client,
@@ -36,13 +38,43 @@ class Builder {
36
38
  this.workingDir = workingDir;
37
39
  this.preprocess = preprocess;
38
40
  this.pathAliases = pathAliases;
41
+ this.digest = digest;
39
42
  }
40
43
  async bundle(generate) {
44
+ let entry = null;
45
+ if (generate == "ssr") {
46
+ entry = `
47
+ import App from "${this.path}";
48
+ import { render } from "svelte/server";
49
+
50
+ const rendered = render(App, {
51
+ props: JSON.parse('${JSON.stringify(this.props)}')
52
+ })
53
+
54
+ export default rendered;
55
+ `;
56
+ } else {
57
+ entry = `
58
+ import App from "${this.path}";
59
+ import { hydrate } from "svelte";
60
+
61
+ function hydrateApp() {
62
+ const app = hydrate(App, {
63
+ target: document.getElementById("hydratee-${this.digest}"),
64
+ props: JSON.parse('${JSON.stringify(this.props)}')
65
+ })
66
+
67
+ app.flushSync();
68
+ }
69
+
70
+ export default hydrateApp;
71
+ `;
72
+ }
41
73
  const bundle = (await (await rollup({
42
74
  input: "entry",
43
75
  output: {
44
76
  format: "esm",
45
- sourcemap: false
77
+ sourcemap: true
46
78
  },
47
79
  watch: {
48
80
  skipWrite: true
@@ -50,7 +82,7 @@ class Builder {
50
82
  plugins: [
51
83
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
52
84
  virtual({
53
- entry: `import App from '${this.path}'; export default App`
85
+ entry
54
86
  }),
55
87
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
56
88
  svelte({
@@ -61,9 +93,8 @@ class Builder {
61
93
  },
62
94
  emitCss: false,
63
95
  preprocess: sveltePreprocess(this.preprocess),
64
- onwarn: (warning, handler) => {
65
- if (warning.code === "missing-declaration" && warning.message.includes("'props'")) return;
66
- handler(warning);
96
+ onwarn: (warning) => {
97
+ throw warning;
67
98
  }
68
99
  }),
69
100
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
@@ -83,45 +114,55 @@ class Builder {
83
114
  swc({
84
115
  swc: {
85
116
  jsc: {
86
- target: "es6"
87
- }
117
+ target: "es6",
118
+ minify: {
119
+ format: {
120
+ comments: "all"
121
+ }
122
+ }
123
+ },
124
+ minify: true,
125
+ sourceMaps: true,
126
+ inlineSourcesContent: true
88
127
  }
89
128
  })
90
129
  ]
91
- })).generate({ format: "esm", sourcemap: "inline" })).output;
92
- return bundle[0].code;
130
+ })).generate({ format: "esm", sourcemap: true })).output;
131
+ bundle[0].map.sources = bundle[0].map.sources.map((el) => {
132
+ return path.relative(this.path, this.root) + "/" + path.relative(this.root, el);
133
+ });
134
+ return `//# sourceMappingURL=${bundle[0].map.toUrl()}
135
+ //# sourceURL=${path.relative(this.path, this.root) + "/" + path.relative(this.root, this.path)}
136
+ ${bundle[0].code}`.trim();
93
137
  }
94
138
  async client() {
95
- return this.compiled?.client || this.standardizeClient(await this.bundle("dom"));
96
- }
97
- standardizeClient(code) {
98
- const ast = recast.parse(code);
99
- let name;
100
- recast.visit(ast, {
101
- visitExportNamedDeclaration: (path) => {
102
- const stagingName = path.node?.specifiers?.[0].local?.name;
103
- name = typeof stagingName !== "string" ? "" : stagingName;
104
- path.prune();
105
- return false;
106
- }
107
- });
108
- recast.visit(ast, {
109
- visitIdentifier: (path) => {
110
- if (path.node.name === name) {
111
- path.node.name = "App";
112
- }
113
- return false;
114
- }
115
- });
116
- return recast.print(ast).code;
139
+ return this.compiled?.client || await this.bundle("dom");
117
140
  }
141
+ // standardizeClient (code: string): string {
142
+ // const ast = recast.parse(code)
143
+ // let name: string | undefined
144
+ // recast.visit(ast, {
145
+ // visitExportNamedDeclaration: (path) => {
146
+ // const stagingName: any = path.node?.specifiers?.[0].local?.name
147
+ // name = typeof stagingName !== 'string' ? '' : stagingName
148
+ // path.prune()
149
+ // return false
150
+ // }
151
+ // })
152
+ // recast.visit(ast, {
153
+ // visitIdentifier: (path) => {
154
+ // if (path.node.name === name) {
155
+ // path.node.name = 'App'
156
+ // }
157
+ // return false
158
+ // }
159
+ // })
160
+ // return recast.print(ast).code
161
+ // }s
118
162
  async server() {
119
163
  const output = this.compiled?.server || await this.bundle("ssr");
120
- const Component = importFromStringSync(output, {
121
- globals: { props: this.props }
122
- }).default;
123
- const { html, css, head } = await Component.render(this.locals);
124
- return { output, html, head, css: css.code };
164
+ const { html, css, head } = importFromStringSync(output).default;
165
+ return { output, html, head, css: css?.code };
125
166
  }
126
167
  async build() {
127
168
  try {
@@ -1,7 +1,8 @@
1
1
  import Builder from "actionview-svelte-handler";
2
2
 
3
3
  const bob = new Builder(
4
- '<%= path %>',
4
+ '<%= path %>',
5
+ '<%= Rails.root %>',
5
6
  JSON.parse('<%= Svelte.props.to_json || "{}" %>'),
6
7
  JSON.parse('<%= locals.to_json || "{}" %>'),
7
8
  '<%= compiled_client || "" %>',
@@ -9,7 +10,8 @@ const bob = new Builder(
9
10
  <%= ssr %>,
10
11
  '<%= Rails.root %>',
11
12
  JSON.parse('<%= Svelte.preprocess.to_json || "{}" %>'),
12
- JSON.parse('<%= Svelte.aliases.to_json || "{}" %>')
13
+ JSON.parse('<%= Svelte.aliases.to_json || "{}" %>'),
14
+ '<%= digest %>'
13
15
  )
14
16
 
15
17
  const built = await bob.build()
@@ -7,14 +7,6 @@
7
7
  <%= result.dig(:server, :css) %>
8
8
  </style>
9
9
  <template data-island>
10
- <script type="module">
11
- <%= result.dig(:client) %>
12
-
13
- new App({
14
- target: document.getElementById("hydratee-<%= digest %>"),
15
- props: JSON.parse('<%= locals.to_json %>'),
16
- hydrate: true
17
- });
18
- </script>
10
+ <script type="module">(<%= result.dig(:client).strip %>)();</script>
19
11
  </template>
20
12
  </is-land>
@@ -1,3 +1,3 @@
1
1
  module Svelte
2
- VERSION = "0.6.0"
2
+ VERSION = "0.8.0"
3
3
  end
data/lib/ts/builder.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { readable, Stores } from 'svelte/store'
2
1
  import { importFromStringSync } from 'module-from-string'
3
2
  import { sveltePreprocess } from 'svelte-preprocess'
4
3
  import type { Warning } from 'svelte/types/compiler/interfaces'
@@ -10,6 +9,8 @@ import commonjs from '@rollup/plugin-commonjs';
10
9
  import { nodeResolve } from '@rollup/plugin-node-resolve';
11
10
  import virtual from '@rollup/plugin-virtual';
12
11
  import swc from '@rollup/plugin-swc';
12
+ import path from "node:path"
13
+ import { render } from "svelte/server"
13
14
 
14
15
  export interface BuildSuccess {
15
16
  client: string
@@ -35,7 +36,7 @@ export type BuildResult = BuildSuccess | BuildError
35
36
  */
36
37
  class Builder {
37
38
  path: string
38
- props: Stores
39
+ props: object
39
40
  locals: object
40
41
  compiled: {
41
42
  client: string | null
@@ -46,9 +47,12 @@ class Builder {
46
47
  workingDir: string
47
48
  preprocess: object
48
49
  pathAliases?: object
50
+ root: string
51
+ digest: string
49
52
 
50
53
  constructor (
51
54
  path: string,
55
+ root: string,
52
56
  props: object,
53
57
  locals: object,
54
58
  client: string | null,
@@ -56,10 +60,12 @@ class Builder {
56
60
  ssr: boolean,
57
61
  workingDir: string,
58
62
  preprocess: object,
59
- pathAliases: object
63
+ pathAliases: object,
64
+ digest: string
60
65
  ) {
61
66
  this.path = path
62
- this.props = readable(Object.assign(props, locals, props))
67
+ this.root = root
68
+ this.props = Object.assign(props, props, locals)
63
69
  this.locals = locals
64
70
  this.compiled = {
65
71
  client,
@@ -69,14 +75,46 @@ class Builder {
69
75
  this.workingDir = workingDir
70
76
  this.preprocess = preprocess
71
77
  this.pathAliases = pathAliases
78
+ this.digest = digest
72
79
  }
73
80
 
74
81
  async bundle (generate: 'ssr' | 'dom'): Promise<string> {
82
+ let entry = null
83
+
84
+ if(generate == 'ssr') {
85
+ entry = `
86
+ import App from "${this.path}";
87
+ import { render } from "svelte/server";
88
+
89
+ const rendered = render(App, {
90
+ props: JSON.parse('${JSON.stringify(this.props)}')
91
+ })
92
+
93
+ export default rendered;
94
+ `
95
+ } else {
96
+ entry = `
97
+ import App from "${this.path}";
98
+ import { hydrate } from "svelte";
99
+
100
+ function hydrateApp() {
101
+ const app = hydrate(App, {
102
+ target: document.getElementById("hydratee-${this.digest}"),
103
+ props: JSON.parse('${JSON.stringify(this.props)}')
104
+ })
105
+
106
+ app.flushSync();
107
+ }
108
+
109
+ export default hydrateApp;
110
+ `
111
+ }
112
+
75
113
  const bundle = (await (await rollup({
76
114
  input: 'entry',
77
115
  output: {
78
116
  format: "esm",
79
- sourcemap: false
117
+ sourcemap: true
80
118
  },
81
119
  watch: {
82
120
  skipWrite: true
@@ -84,7 +122,7 @@ class Builder {
84
122
  plugins: [
85
123
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
86
124
  virtual({
87
- entry: `import App from '${this.path}'; export default App`
125
+ entry: entry
88
126
  }),
89
127
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
90
128
  svelte({
@@ -95,13 +133,8 @@ class Builder {
95
133
  },
96
134
  emitCss: false,
97
135
  preprocess: sveltePreprocess(this.preprocess),
98
- onwarn: (warning: Warning, handler: Function) => {
99
- if (
100
- warning.code === 'missing-declaration' &&
101
- warning.message.includes("'props'")
102
- ) return
103
-
104
- handler(warning)
136
+ onwarn: (warning: Warning) => {
137
+ throw warning;
105
138
  }
106
139
  }),
107
140
  // @ts-expect-error see https://github.com/rollup/plugins/issues/1662
@@ -119,58 +152,66 @@ class Builder {
119
152
  swc({
120
153
  swc: {
121
154
  jsc: {
122
- target: "es6"
123
- }
155
+ target: "es6",
156
+ minify: {
157
+ format: {
158
+ comments: 'all'
159
+ },
160
+ }
161
+ },
162
+ minify: true,
163
+ sourceMaps: true,
164
+ inlineSourcesContent: true
124
165
  }
125
166
  })
126
167
  ]
127
- })).generate({ format: "esm", sourcemap: "inline" })).output
128
-
129
- return bundle[0].code
168
+ })).generate({ format: "esm", sourcemap: true })).output
169
+
170
+ bundle[0].map!.sources = bundle[0].map!.sources.map((el) => {
171
+ return path.relative(this.path, this.root) + "/" + path.relative(this.root, el)
172
+ })
173
+
174
+ return `//# sourceMappingURL=${bundle[0].map!.toUrl()}\n//# sourceURL=${path.relative(this.path, this.root) + "/" + path.relative(this.root, this.path) }\n${bundle[0].code}`.trim()
130
175
  }
131
176
 
132
177
  async client (): Promise<string> {
133
178
  return (
134
- this.compiled?.client || this.standardizeClient(await this.bundle("dom")) // eslint-disable-line
179
+ this.compiled?.client || (await this.bundle("dom")) // eslint-disable-line
135
180
  )
136
181
  }
137
182
 
138
- standardizeClient (code: string): string {
139
- const ast = recast.parse(code)
140
-
141
- let name: string | undefined
142
-
143
- recast.visit(ast, {
144
- visitExportNamedDeclaration: (path) => {
145
- const stagingName: any = path.node?.specifiers?.[0].local?.name
146
- name = typeof stagingName !== 'string' ? '' : stagingName
147
- path.prune()
148
- return false
149
- }
150
- })
151
-
152
- recast.visit(ast, {
153
- visitIdentifier: (path) => {
154
- if (path.node.name === name) {
155
- path.node.name = 'App'
156
- }
157
- return false
158
- }
159
- })
183
+ // standardizeClient (code: string): string {
184
+ // const ast = recast.parse(code)
185
+
186
+ // let name: string | undefined
187
+
188
+ // recast.visit(ast, {
189
+ // visitExportNamedDeclaration: (path) => {
190
+ // const stagingName: any = path.node?.specifiers?.[0].local?.name
191
+ // name = typeof stagingName !== 'string' ? '' : stagingName
192
+ // path.prune()
193
+ // return false
194
+ // }
195
+ // })
196
+
197
+ // recast.visit(ast, {
198
+ // visitIdentifier: (path) => {
199
+ // if (path.node.name === name) {
200
+ // path.node.name = 'App'
201
+ // }
202
+ // return false
203
+ // }
204
+ // })
160
205
 
161
- return recast.print(ast).code
162
- }
206
+ // return recast.print(ast).code
207
+ // }s
163
208
 
164
209
  async server (): Promise<{ output: string, html: string, css: string, head: string }> {
165
210
  const output = this.compiled?.server || (await this.bundle('ssr')) // eslint-disable-line
166
211
 
167
- const Component = importFromStringSync(output, {
168
- globals: { props: this.props }
169
- }).default
170
-
171
- const { html, css, head } = await Component.render(this.locals)
212
+ const { html, css, head } = importFromStringSync(output).default
172
213
 
173
- return { output, html, head, css: css.code }
214
+ return { output, html, head, css: css?.code }
174
215
  }
175
216
 
176
217
  async build (): Promise<BuildResult> {
@@ -1,4 +1,3 @@
1
- import { Stores } from 'svelte/store';
2
1
  export interface BuildSuccess {
3
2
  client: string;
4
3
  server: {
@@ -20,7 +19,7 @@ export type BuildResult = BuildSuccess | BuildError;
20
19
  */
21
20
  declare class Builder {
22
21
  path: string;
23
- props: Stores;
22
+ props: object;
24
23
  locals: object;
25
24
  compiled: {
26
25
  client: string | null;
@@ -30,10 +29,11 @@ declare class Builder {
30
29
  workingDir: string;
31
30
  preprocess: object;
32
31
  pathAliases?: object;
33
- constructor(path: string, props: object, locals: object, client: string | null, server: string | null, ssr: boolean, workingDir: string, preprocess: object, pathAliases: object);
32
+ root: string;
33
+ digest: string;
34
+ constructor(path: string, root: string, props: object, locals: object, client: string | null, server: string | null, ssr: boolean, workingDir: string, preprocess: object, pathAliases: object, digest: string);
34
35
  bundle(generate: 'ssr' | 'dom'): Promise<string>;
35
36
  client(): Promise<string>;
36
- standardizeClient(code: string): string;
37
37
  server(): Promise<{
38
38
  output: string;
39
39
  html: string;
data/package-lock.json CHANGED
@@ -14,19 +14,16 @@
14
14
  "@rollup/plugin-swc": "^0.4.0",
15
15
  "@rollup/plugin-virtual": "^3.0.2",
16
16
  "@swc/core": "^1.7.26",
17
- "esbuild-svelte": "^0.8.1",
18
- "flat": "^6.0.1",
19
17
  "inflected": "^2.1.0",
20
- "lodash.merge": "^4.6.2",
21
18
  "module-from-string": "^3.3.1",
22
19
  "recast": "^0.23.9",
23
20
  "rollup": "^4.22.4",
24
21
  "rollup-plugin-svelte": "^7.2.2",
25
- "svelte": "^4.2.19",
26
- "svelte-preprocess": "^6.0.2"
22
+ "svelte": "^5.0.2",
23
+ "svelte-preprocess": "^6.0.3"
27
24
  },
28
25
  "devDependencies": {
29
- "@types/lodash.merge": "^4.6.9",
26
+ "@types/convert-source-map": "^2.0.3",
30
27
  "surge": "^0.23.1",
31
28
  "ts-standard": "^12.0.2",
32
29
  "typescript": "^5.5.4",
@@ -3161,6 +3158,12 @@
3161
3158
  "@swc/counter": "^0.1.3"
3162
3159
  }
3163
3160
  },
3161
+ "node_modules/@types/convert-source-map": {
3162
+ "version": "2.0.3",
3163
+ "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-2.0.3.tgz",
3164
+ "integrity": "sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==",
3165
+ "dev": true
3166
+ },
3164
3167
  "node_modules/@types/estree": {
3165
3168
  "version": "1.0.5",
3166
3169
  "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
@@ -3193,21 +3196,6 @@
3193
3196
  "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==",
3194
3197
  "dev": true
3195
3198
  },
3196
- "node_modules/@types/lodash": {
3197
- "version": "4.17.7",
3198
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz",
3199
- "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==",
3200
- "dev": true
3201
- },
3202
- "node_modules/@types/lodash.merge": {
3203
- "version": "4.6.9",
3204
- "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.9.tgz",
3205
- "integrity": "sha512-23sHDPmzd59kUgWyKGiOMO2Qb9YtqRO/x4IhkgNUiPQ1+5MUVqi6bCZeq9nBJ17msjIMbEIO5u+XW4Kz6aGUhQ==",
3206
- "dev": true,
3207
- "dependencies": {
3208
- "@types/lodash": "*"
3209
- }
3210
- },
3211
3199
  "node_modules/@types/markdown-it": {
3212
3200
  "version": "14.1.2",
3213
3201
  "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz",
@@ -3810,6 +3798,14 @@
3810
3798
  "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
3811
3799
  }
3812
3800
  },
3801
+ "node_modules/acorn-typescript": {
3802
+ "version": "1.4.13",
3803
+ "resolved": "https://registry.npmjs.org/acorn-typescript/-/acorn-typescript-1.4.13.tgz",
3804
+ "integrity": "sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==",
3805
+ "peerDependencies": {
3806
+ "acorn": ">=8.9.0"
3807
+ }
3808
+ },
3813
3809
  "node_modules/ajv": {
3814
3810
  "version": "6.12.6",
3815
3811
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -3887,11 +3883,11 @@
3887
3883
  "dev": true
3888
3884
  },
3889
3885
  "node_modules/aria-query": {
3890
- "version": "5.3.0",
3891
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
3892
- "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
3893
- "dependencies": {
3894
- "dequal": "^2.0.3"
3886
+ "version": "5.3.2",
3887
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
3888
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
3889
+ "engines": {
3890
+ "node": ">= 0.4"
3895
3891
  }
3896
3892
  },
3897
3893
  "node_modules/array-buffer-byte-length": {
@@ -4410,18 +4406,6 @@
4410
4406
  "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
4411
4407
  "dev": true
4412
4408
  },
4413
- "node_modules/code-red": {
4414
- "version": "1.0.4",
4415
- "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
4416
- "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
4417
- "dependencies": {
4418
- "@jridgewell/sourcemap-codec": "^1.4.15",
4419
- "@types/estree": "^1.0.1",
4420
- "acorn": "^8.10.0",
4421
- "estree-walker": "^3.0.3",
4422
- "periscopic": "^3.1.0"
4423
- }
4424
- },
4425
4409
  "node_modules/color-convert": {
4426
4410
  "version": "2.0.1",
4427
4411
  "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -4521,18 +4505,6 @@
4521
4505
  "node": ">= 8"
4522
4506
  }
4523
4507
  },
4524
- "node_modules/css-tree": {
4525
- "version": "2.3.1",
4526
- "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
4527
- "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
4528
- "dependencies": {
4529
- "mdn-data": "2.0.30",
4530
- "source-map-js": "^1.0.1"
4531
- },
4532
- "engines": {
4533
- "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
4534
- }
4535
- },
4536
4508
  "node_modules/csstype": {
4537
4509
  "version": "3.1.3",
4538
4510
  "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@@ -4675,14 +4647,6 @@
4675
4647
  "node": ">=0.4.0"
4676
4648
  }
4677
4649
  },
4678
- "node_modules/dequal": {
4679
- "version": "2.0.3",
4680
- "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
4681
- "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
4682
- "engines": {
4683
- "node": ">=6"
4684
- }
4685
- },
4686
4650
  "node_modules/dir-glob": {
4687
4651
  "version": "3.0.1",
4688
4652
  "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -4949,21 +4913,6 @@
4949
4913
  "@esbuild/win32-x64": "0.23.0"
4950
4914
  }
4951
4915
  },
4952
- "node_modules/esbuild-svelte": {
4953
- "version": "0.8.1",
4954
- "resolved": "https://registry.npmjs.org/esbuild-svelte/-/esbuild-svelte-0.8.1.tgz",
4955
- "integrity": "sha512-iswZSetqRxYaQoWMd38Gu6AanIL6KFsVj8/unei7qTaxjAkRDulW62/Bc5nmeogKBWekBvrPOE106wui7gYARQ==",
4956
- "dependencies": {
4957
- "@jridgewell/trace-mapping": "^0.3.19"
4958
- },
4959
- "engines": {
4960
- "node": ">=14"
4961
- },
4962
- "peerDependencies": {
4963
- "esbuild": ">=0.9.6",
4964
- "svelte": ">=3.43.0 <6"
4965
- }
4966
- },
4967
4916
  "node_modules/escalade": {
4968
4917
  "version": "3.1.2",
4969
4918
  "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
@@ -5445,6 +5394,11 @@
5445
5394
  "url": "https://opencollective.com/eslint"
5446
5395
  }
5447
5396
  },
5397
+ "node_modules/esm-env": {
5398
+ "version": "1.0.0",
5399
+ "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz",
5400
+ "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA=="
5401
+ },
5448
5402
  "node_modules/espree": {
5449
5403
  "version": "9.6.1",
5450
5404
  "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
@@ -5486,6 +5440,15 @@
5486
5440
  "node": ">=0.10"
5487
5441
  }
5488
5442
  },
5443
+ "node_modules/esrap": {
5444
+ "version": "1.2.2",
5445
+ "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.2.2.tgz",
5446
+ "integrity": "sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==",
5447
+ "dependencies": {
5448
+ "@jridgewell/sourcemap-codec": "^1.4.15",
5449
+ "@types/estree": "^1.0.1"
5450
+ }
5451
+ },
5489
5452
  "node_modules/esrecurse": {
5490
5453
  "version": "4.3.0",
5491
5454
  "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
@@ -5507,14 +5470,6 @@
5507
5470
  "node": ">=4.0"
5508
5471
  }
5509
5472
  },
5510
- "node_modules/estree-walker": {
5511
- "version": "3.0.3",
5512
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
5513
- "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
5514
- "dependencies": {
5515
- "@types/estree": "^1.0.0"
5516
- }
5517
- },
5518
5473
  "node_modules/esutils": {
5519
5474
  "version": "2.0.3",
5520
5475
  "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
@@ -5668,17 +5623,6 @@
5668
5623
  "url": "https://github.com/sponsors/sindresorhus"
5669
5624
  }
5670
5625
  },
5671
- "node_modules/flat": {
5672
- "version": "6.0.1",
5673
- "resolved": "https://registry.npmjs.org/flat/-/flat-6.0.1.tgz",
5674
- "integrity": "sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw==",
5675
- "bin": {
5676
- "flat": "cli.js"
5677
- },
5678
- "engines": {
5679
- "node": ">=18"
5680
- }
5681
- },
5682
5626
  "node_modules/flat-cache": {
5683
5627
  "version": "3.2.0",
5684
5628
  "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
@@ -6990,7 +6934,8 @@
6990
6934
  "node_modules/lodash.merge": {
6991
6935
  "version": "4.6.2",
6992
6936
  "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
6993
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
6937
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
6938
+ "dev": true
6994
6939
  },
6995
6940
  "node_modules/loose-envify": {
6996
6941
  "version": "1.4.0",
@@ -7026,11 +6971,6 @@
7026
6971
  "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==",
7027
6972
  "dev": true
7028
6973
  },
7029
- "node_modules/mdn-data": {
7030
- "version": "2.0.30",
7031
- "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
7032
- "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="
7033
- },
7034
6974
  "node_modules/merge2": {
7035
6975
  "version": "1.4.1",
7036
6976
  "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -7516,16 +7456,6 @@
7516
7456
  "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
7517
7457
  "dev": true
7518
7458
  },
7519
- "node_modules/periscopic": {
7520
- "version": "3.1.0",
7521
- "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
7522
- "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
7523
- "dependencies": {
7524
- "@types/estree": "^1.0.0",
7525
- "estree-walker": "^3.0.0",
7526
- "is-reference": "^3.0.0"
7527
- }
7528
- },
7529
7459
  "node_modules/picocolors": {
7530
7460
  "version": "1.0.1",
7531
7461
  "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
@@ -8342,6 +8272,7 @@
8342
8272
  "version": "1.2.0",
8343
8273
  "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
8344
8274
  "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
8275
+ "devOptional": true,
8345
8276
  "engines": {
8346
8277
  "node": ">=0.10.0"
8347
8278
  }
@@ -8790,33 +8721,32 @@
8790
8721
  "dev": true
8791
8722
  },
8792
8723
  "node_modules/svelte": {
8793
- "version": "4.2.19",
8794
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz",
8795
- "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==",
8796
- "dependencies": {
8797
- "@ampproject/remapping": "^2.2.1",
8798
- "@jridgewell/sourcemap-codec": "^1.4.15",
8799
- "@jridgewell/trace-mapping": "^0.3.18",
8800
- "@types/estree": "^1.0.1",
8801
- "acorn": "^8.9.0",
8802
- "aria-query": "^5.3.0",
8803
- "axobject-query": "^4.0.0",
8804
- "code-red": "^1.0.3",
8805
- "css-tree": "^2.3.1",
8806
- "estree-walker": "^3.0.3",
8807
- "is-reference": "^3.0.1",
8724
+ "version": "5.0.2",
8725
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.0.2.tgz",
8726
+ "integrity": "sha512-TIqp5kjyTMa45L0McUvVfjuvlF/hyxVolyAc9APY3/FeF5aqYpt+Y1PckPQ7DlsDkthxNeq2+ystop8GlIV3kw==",
8727
+ "dependencies": {
8728
+ "@ampproject/remapping": "^2.3.0",
8729
+ "@jridgewell/sourcemap-codec": "^1.5.0",
8730
+ "@types/estree": "^1.0.5",
8731
+ "acorn": "^8.12.1",
8732
+ "acorn-typescript": "^1.4.13",
8733
+ "aria-query": "^5.3.1",
8734
+ "axobject-query": "^4.1.0",
8735
+ "esm-env": "^1.0.0",
8736
+ "esrap": "^1.2.2",
8737
+ "is-reference": "^3.0.2",
8808
8738
  "locate-character": "^3.0.0",
8809
- "magic-string": "^0.30.4",
8810
- "periscopic": "^3.1.0"
8739
+ "magic-string": "^0.30.11",
8740
+ "zimmerframe": "^1.1.2"
8811
8741
  },
8812
8742
  "engines": {
8813
- "node": ">=16"
8743
+ "node": ">=18"
8814
8744
  }
8815
8745
  },
8816
8746
  "node_modules/svelte-preprocess": {
8817
- "version": "6.0.2",
8818
- "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-6.0.2.tgz",
8819
- "integrity": "sha512-OvDTLfaOkkhjprbDKO0SOCkjNYuHy16dbD4SpqbIi6QiabOMHxRT4km5/dzbFFkmW1L0E2INF3MFltG2pgOyKQ==",
8747
+ "version": "6.0.3",
8748
+ "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-6.0.3.tgz",
8749
+ "integrity": "sha512-PLG2k05qHdhmRG7zR/dyo5qKvakhm8IJ+hD2eFRQmMLHp7X3eJnjeupUtvuRpbNiF31RjVw45W+abDwHEmP5OA==",
8820
8750
  "hasInstallScript": true,
8821
8751
  "engines": {
8822
8752
  "node": ">= 18.0.0"
@@ -10032,6 +9962,11 @@
10032
9962
  "funding": {
10033
9963
  "url": "https://github.com/sponsors/sindresorhus"
10034
9964
  }
9965
+ },
9966
+ "node_modules/zimmerframe": {
9967
+ "version": "1.1.2",
9968
+ "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz",
9969
+ "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w=="
10035
9970
  }
10036
9971
  }
10037
9972
  }
data/package.json CHANGED
@@ -23,16 +23,13 @@
23
23
  "@rollup/plugin-swc": "^0.4.0",
24
24
  "@rollup/plugin-virtual": "^3.0.2",
25
25
  "@swc/core": "^1.7.26",
26
- "esbuild-svelte": "^0.8.1",
27
- "flat": "^6.0.1",
28
26
  "inflected": "^2.1.0",
29
- "lodash.merge": "^4.6.2",
30
27
  "module-from-string": "^3.3.1",
31
28
  "recast": "^0.23.9",
32
29
  "rollup": "^4.22.4",
33
30
  "rollup-plugin-svelte": "^7.2.2",
34
- "svelte": "^4.2.19",
35
- "svelte-preprocess": "^6.0.2"
31
+ "svelte": "^5.0.2",
32
+ "svelte-preprocess": "^6.0.3"
36
33
  },
37
34
  "engines": {
38
35
  "node": ">=12.16.0"
@@ -48,7 +45,7 @@
48
45
  "docs:deploy": "vitepress build docs && surge docs/.vitepress/dist"
49
46
  },
50
47
  "devDependencies": {
51
- "@types/lodash.merge": "^4.6.9",
48
+ "@types/convert-source-map": "^2.0.3",
52
49
  "surge": "^0.23.1",
53
50
  "ts-standard": "^12.0.2",
54
51
  "typescript": "^5.5.4",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview-svelte-handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - reesericci
8
8
  autorequire: svelte
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2024-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails