Skip to content

Commit 5289159

Browse files
committed
start removing esbuild
1 parent bd8b218 commit 5289159

19 files changed

+105
-291
lines changed

importmap.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"imports": {
3+
"@socketsupply/tonic": "npm:@socketsupply/tonic",
4+
"@socketsupply/components": "npm:@socketsupply/components",
5+
"@socketsupply/components/*": "npm:@socketsupply/components/*",
6+
"@socketsupply/indexed": "npm:@socketsupply/indexed",
7+
"monaco-editor": "npm:monaco-editor",
8+
"xterm": "npm:xterm",
9+
"xterm-addon-fit": "npm:xterm-addon-fit",
10+
"xterm-addon-search": "npm:xterm-addon-search"
11+
}
12+
}

socket.ini

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,43 @@ name = "union"
4646
output = "build"
4747

4848
; The build script. It runs before the `[build] copy` phase.
49-
script = "node build.js"
49+
; script = "node build.js"
5050

5151
; Key value pairs added to the envrionment.
5252
[env]
5353
DEV = true
5454

5555

56+
[build.copy-map]
57+
;
58+
; What node modules to allow
59+
;
60+
importmap.json = importmap.json
61+
62+
;
63+
; Application Files
64+
;
65+
src/index.html = index.html
66+
src/index.js = index.js
67+
src/vm.js = vm.js
68+
src/preview.js = preview.js
69+
src/worker.js = worker.js
70+
src/git-data.js = git-data.js
71+
src/settings.json = settings.json
72+
73+
src/components = components
74+
src/views = views
75+
src/fonts = fonts
76+
src/lib = lib
77+
src/pages = pages
78+
src/css = css
79+
80+
;
81+
; Node modules
82+
;
83+
node_modules = node_modules
84+
85+
5686
[build.script]
5787
; If true, it will pass build arguments to the build script. WARNING: this could be deprecated in the future.
5888
; default value: false
@@ -64,8 +94,9 @@ forward_arguments = false
6494
; Could be a string or an array of strings
6595
sources[] = "src"
6696

67-
6897
[webview]
98+
importmap = "/importmap.json"
99+
69100
; Make root open index.html
70101
; default value: "/"
71102
root = "/"
@@ -79,7 +110,6 @@ root = "/"
79110
watch = true
80111

81112
; Custom headers injected on all webview routes
82-
[webview]
83113
; default value: ""
84114
; headers[] = "X-Custom-Header: Some-Value"
85115

@@ -99,6 +129,8 @@ $HOST_HOME = /user/home
99129
allowed[] = "https://*.stripe.com/*"
100130
allowed[] = "https://stripe.com/*"
101131
allowed[] = "https://*.stripe.network/*"
132+
allowed[] = "https://*.stripecdn.com/*"
133+
allowed[] = "https://newassets.hcaptcha.com/*"
102134

103135
[permissions]
104136
; Allow/Disallow fullscreen in application

src/components/confirm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TonicDialog } from '@socketsupply/components/dialog'
1+
import { TonicDialog } from 'npm:@socketsupply/components/dialog.js'
22

33
class DialogConfirm extends TonicDialog {
44
async prompt (opts) {

src/components/editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import fs from 'socket:fs'
22
import path from 'socket:path'
33
import { sha256 } from 'socket:network'
44

5-
import * as monaco from 'monaco-editor'
6-
import Tonic from '@socketsupply/tonic'
5+
import * as monaco from 'npm:monaco-editor'
6+
import Tonic from 'npm:@socketsupply/tonic'
77

88
function rgbaToHex (rgbaString) {
99
const rgbaValues = rgbaString.match(/\d+/g)

src/components/git-status.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Tonic from '@socketsupply/tonic'
1+
import Tonic from 'npm:@socketsupply/tonic'
22
import { exec } from 'socket:child_process'
33

44
class GitStatus extends Tonic {

src/components/patch-requests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Tonic from '@socketsupply/tonic'
1+
import Tonic from 'npm:@socketsupply/tonic'
22
import path from 'socket:path'
33
import fs from 'socket:fs'
44
import { exec } from 'socket:child_process'

src/components/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from 'socket:path'
44
import { lookup } from 'socket:mime'
55
import { cp, rm } from '../lib/fs.js'
66

7-
import Tonic from '@socketsupply/tonic'
7+
import Tonic from 'npm:@socketsupply/tonic'
88

99
const EXPANDED_STATE = 1
1010
const CLOSED_STATE = 0

src/components/properties.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Tonic from '@socketsupply/tonic'
1+
import Tonic from 'npm:@socketsupply/tonic'
22
import process from 'socket:process'
33

44
import Config from '../lib/config.js'

src/components/publish.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import fs from 'socket:fs'
22
import path from 'socket:path'
33
import { exec, execSync } from 'socket:child_process'
44

5-
import Tonic from '@socketsupply/tonic'
6-
import { TonicDialog } from '@socketsupply/components/dialog'
5+
import Tonic from 'npm:@socketsupply/tonic'
6+
import { TonicDialog } from 'npm:@socketsupply/components/dialog'
77

88
export class DialogPublish extends TonicDialog {
99
click (e) {

src/components/relative-date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Tonic from '@socketsupply/tonic'
1+
import Tonic from 'npm:@socketsupply/tonic'
22

33
const T_YEARS = 1000 * 60 * 60 * 24 * 365
44
const T_MONTHS = 1000 * 60 * 60 * 24 * 30

0 commit comments

Comments
 (0)