@voxgig/model 11.1.1 → 12.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.
@@ -8,8 +8,6 @@ sys: shape: type({})
8
8
  # Service base has no defaults.
9
9
  sys: shape: srv: base: {
10
10
  in: {
11
- # TODO: validate leaf?
12
- # &&: => &:, &: &:, &: &: &:, etc
13
11
  }
14
12
  out: {}
15
13
  deps: {
@@ -20,7 +18,7 @@ sys: shape: srv: base: {
20
18
  path: {
21
19
  prefix?: string
22
20
  area?: string
23
- suffix?: string
21
+ suffix?: string
24
22
  }
25
23
  method: string
26
24
  cors: {
@@ -38,7 +36,6 @@ sys: shape: srv: base: {
38
36
  }
39
37
 
40
38
 
41
- # Shared service defaults
42
39
  sys: shape: srv: std: $.sys.shape.srv.base & {
43
40
  api: web: {
44
41
  active: *true | boolean
@@ -91,36 +88,15 @@ sys: shape: ent: {
91
88
  }
92
89
  }
93
90
 
94
- # sys: shape: ent: field: &: {
95
- # active: *true | boolean
96
- # kind: *'Text' | string
97
- # title: string
98
-
99
- # # Developer model (backend)
100
- # dx: {}
101
91
 
102
- # # User inerface model (frontend)
103
- # ux: {
104
- # desc: string
105
- # }
106
- # }
107
92
 
108
93
 
109
94
 
110
- # App Shapes
111
- # --------------
95
+
112
96
 
113
97
  sys: shape: app: {
114
98
  name: string
115
99
  layout: string
116
- # TODO: test
117
- # parts: {
118
- # &: {
119
- # part: string
120
- # active: boolean
121
- # # active: *true | boolean
122
- # }
123
- # }
124
100
  }
125
101
 
126
102
  sys: shape: part: img: {
@@ -128,29 +104,5 @@ sys: shape: part: img: {
128
104
  svg: string
129
105
  }
130
106
 
131
-
132
- # app: web: basic: .sys.shape.app
133
-
134
- # app: web: basic: {
135
- # name: basic
136
- # layout: BasicAdmin
137
- # }
138
-
139
- # app: web: basic: parts: {
140
- # head: {
141
- # part: BasicHead
142
- # }
143
-
144
- # side: {
145
- # part: BasicSide
146
- # }
147
-
148
- # main: {
149
- # part: BasicMain
150
- # }
151
-
152
- # foot: {
153
- # part: BasicFoot
154
- # }
155
- # }
156
107
 
108
+ # app: web: basic: .sys.shape.app
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxgig/model",
3
- "version": "11.1.1",
3
+ "version": "12.0.1",
4
4
  "main": "dist/model.js",
5
5
  "type": "commonjs",
6
6
  "types": "dist/model.d.ts",
@@ -19,14 +19,14 @@
19
19
  "url": "git://github.com/voxgig/model.git"
20
20
  },
21
21
  "scripts": {
22
- "test": "node --test --experimental-test-coverage --test-coverage-include='dist/**' --test-coverage-lines=95 --test-coverage-functions=95 --test-coverage-branches=90 \"dist-test/**/*.test.js\"",
22
+ "test": "node ../tools/comment-gate.cjs && node --test --experimental-test-coverage --test-coverage-include='dist/**' --test-coverage-lines=95 --test-coverage-functions=95 --test-coverage-branches=90 \"dist-test/**/*.test.js\"",
23
23
  "test-some": "node --enable-source-maps --test-name-pattern=\"$TEST_PATTERN\" --test dist-test/**/*.test.js",
24
24
  "test-cov": "rm -rf ./coverage && mkdir -p ./coverage && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --enable-source-maps --test \"dist-test/*.test.js\"",
25
25
  "watch": "tsc --build src test -w",
26
26
  "build": "tsc --build src test",
27
- "test-model": "voxgig-model test/sys01/model/model.aon",
28
- "model": "voxgig-model -w model/sys.aon",
29
- "model-build": "voxgig-model -g debug model/sys.aon",
27
+ "test-model": "voxgig-model test/sys01/model/model.aontu",
28
+ "model": "voxgig-model -w model/sys.aontu",
29
+ "model-build": "voxgig-model -g debug model/sys.aontu",
30
30
  "clean": "rm -rf node_modules dist dist-test yarn.lock package-lock.json",
31
31
  "reset": "npm run clean && npm i && npm run build && npm test",
32
32
  "repo-bump": "npm version patch --no-git-tag-version && node -e \"console.log('bumped to v' + require('./package.json').version + ' (package.json only - commit via repo-tag / repo-release)')\"",
@@ -55,9 +55,9 @@
55
55
  "LICENSE"
56
56
  ],
57
57
  "dependencies": {
58
- "@tabnas/jsonic": ">=0.6.2",
59
- "@tabnas/parser": ">=0.8.7",
60
- "aontu": ">=0.64.0",
58
+ "@tabnas/jsonic": ">=0.7.1",
59
+ "@tabnas/parser": ">=0.12.2",
60
+ "aontu": ">=0.75.0",
61
61
  "chokidar": "5.0.0",
62
62
  "memfs": "4.64.0",
63
63
  "shape": ">=10"
package/src/build.ts CHANGED
@@ -81,10 +81,6 @@ class BuildImpl implements Build {
81
81
  let hasErr = false
82
82
  let runlog = []
83
83
 
84
- // Reset per-run error state. The BuildImpl is reused across watch
85
- // rebuilds, so without this a single failure would stick to every
86
- // later build. Reassign (don't clear in place) so a previously
87
- // returned BuildResult keeps its own errors.
88
84
  this.errs = []
89
85
 
90
86
  this.ctx = { step: 'pre', state: {}, watch: rspec.watch }
@@ -117,8 +113,6 @@ class BuildImpl implements Build {
117
113
  }
118
114
  }
119
115
 
120
- // Only reload when a pre-producer actually modified model sources
121
- // (signalled via pr.reload). Previously this always ran on success.
122
116
  const reload = forceReload && !hasErr
123
117
 
124
118
  if (reload) {
@@ -150,7 +144,6 @@ class BuildImpl implements Build {
150
144
 
151
145
  const br: BuildResult =
152
146
  {
153
- // TODO: remove need for this
154
147
  build: () => this,
155
148
 
156
149
  ok: !hasErr,
package/src/config.ts CHANGED
@@ -1,19 +1,45 @@
1
1
  /* Copyright © 2021-2025 Voxgig Ltd, MIT License. */
2
2
 
3
3
 
4
+ import Path from 'node:path'
5
+
4
6
  import type { BuildResult, BuildSpec, Log } from './types'
5
7
 
6
8
  import { Watch } from './watch'
7
9
 
8
10
 
11
+ const CONFIG_FILE = 'model-config.aontu'
12
+ const LEGACY_CONFIG_FILE = 'model-config.aon'
13
+
14
+ const DEFAULT_CONFIG = `
15
+ @"@voxgig/model/model/.model-config/model-config.aontu"
16
+
17
+ sys: model: action: {}
18
+ `
19
+
20
+ const QUOTES = '"\'`'
21
+ const SPACE = ' \t\r\n'
22
+
23
+
24
+
25
+ // What the Model prepared before the config build: a failure to report, or,
26
+ // for a dry run, the config text to serve and the legacy file it comes from.
27
+ type ConfigPrep = {
28
+ err?: Error
29
+ text?: () => string
30
+ from?: string
31
+ }
32
+
9
33
 
10
34
  class Config {
11
35
  build: BuildSpec
12
36
  watch: Watch
13
37
  log: Log
38
+ prep: ConfigPrep
14
39
 
15
- constructor(spec: BuildSpec, log: Log) {
40
+ constructor(spec: BuildSpec, log: Log, prep: ConfigPrep = {}) {
16
41
  this.log = log
42
+ this.prep = prep
17
43
 
18
44
  this.build = {
19
45
  path: spec.path,
@@ -30,7 +56,14 @@ class Config {
30
56
  }
31
57
 
32
58
  async run(watch: boolean): Promise<BuildResult> {
33
- return this.watch.run('config', watch, '<config>')
59
+ if (this.prep.err) {
60
+ return { ok: false, errs: [this.prep.err], runlog: [] }
61
+ }
62
+ const br = await this.watch.run('config', watch, '<config>')
63
+ if (watch && this.prep.from) {
64
+ await this.watch.add(this.prep.from)
65
+ }
66
+ return br
34
67
  }
35
68
 
36
69
  async start(initial: boolean = true) {
@@ -43,7 +76,191 @@ class Config {
43
76
  }
44
77
 
45
78
 
46
- export { Config, BuildSpec }
79
+ // Creates the config when there is none, migrating a legacy
80
+ // model-config.aon forward if one is present. A dry run writes nothing: the
81
+ // config text is derived afresh from its source on every read instead.
82
+ function prepareConfig(
83
+ fs: any, cbase: string, log: Log, dryrun?: boolean
84
+ ): ConfigPrep {
85
+ const cpath = cbase + '/' + CONFIG_FILE
86
+ const legacy = cbase + '/' + LEGACY_CONFIG_FILE
87
+
88
+ if (fs.existsSync(cpath)) {
89
+ if (fs.existsSync(legacy)) {
90
+ log.warn({
91
+ point: 'config-legacy-ignored', legacy,
92
+ note: 'ignoring ' + legacy + ': ' + cpath + ' takes precedence'
93
+ })
94
+ }
95
+ return {}
96
+ }
97
+
98
+ let old: string | undefined
99
+ try {
100
+ old = fs.readFileSync(legacy, 'utf8')
101
+ }
102
+ catch (err: any) {
103
+ if ('ENOENT' !== err?.code) {
104
+ return { err: configError('cannot read ' + legacy, err) }
105
+ }
106
+ }
107
+
108
+ if (null != old) {
109
+ log.info({
110
+ point: 'config-migrate', legacy, path: cpath,
111
+ note: 'migrated ' + legacy + ' to ' + cpath +
112
+ (dryrun ? ' (dry run: in memory only)' : '')
113
+ })
114
+ }
115
+
116
+ if (dryrun) {
117
+ return null == old ? { text: () => DEFAULT_CONFIG } : {
118
+ text: () => rewriteAonIncludes(fs.readFileSync(legacy, 'utf8')),
119
+ from: legacy,
120
+ }
121
+ }
122
+
123
+ try {
124
+ fs.mkdirSync(cbase, { recursive: true })
125
+ writeAtomic(fs, cpath, null == old ? DEFAULT_CONFIG : rewriteAonIncludes(old))
126
+ }
127
+ catch (err: any) {
128
+ return { err: configError('cannot write ' + cpath, err) }
129
+ }
130
+
131
+ if (null != old) {
132
+ try { fs.unlinkSync(legacy) } catch (_err: any) { }
133
+ }
134
+
135
+ return {}
136
+ }
137
+
138
+
139
+ function configError(what: string, cause: any): Error {
140
+ return Object.assign(
141
+ new Error('model config: ' + what + ': ' + (cause?.message || cause)),
142
+ { code: cause?.code, cause })
143
+ }
144
+
145
+
146
+ // A reader never sees a partial file: the text lands beside the target and
147
+ // is renamed over it.
148
+ function writeAtomic(fs: any, path: string, src: string) {
149
+ const tmp = path + '.' + process.pid + '.' +
150
+ Math.random().toString(36).slice(2) + '.tmp'
151
+ try {
152
+ fs.writeFileSync(tmp, src)
153
+ fs.renameSync(tmp, path)
154
+ }
155
+ catch (err: any) {
156
+ try { fs.unlinkSync(tmp) } catch (_err: any) { }
157
+ throw err
158
+ }
159
+ }
160
+
161
+
162
+ // A dry run writes nothing, so its config is served from memory, derived on
163
+ // each read; its mtime is that of the legacy source, so an edit there
164
+ // invalidates the build cache. Matched by resolved path: callers join with
165
+ // '/', which a Windows path does not spell the same way.
166
+ function readBack(fs: any, path: string, text: () => string, from?: string) {
167
+ const at = Path.resolve(path)
168
+ const mtimeMs = Date.now()
169
+ const mine = (p: any) => Path.resolve(String(p)) === at
170
+
171
+ return {
172
+ ...fs,
173
+ readFileSync: (p: any, opts?: any) => {
174
+ if (!mine(p)) {
175
+ return fs.readFileSync(p, opts)
176
+ }
177
+ const enc = 'string' === typeof opts ? opts : opts?.encoding
178
+ const src = text()
179
+ return null == enc ? Buffer.from(src) : src
180
+ },
181
+ statSync: (p: any, ...rest: any[]) => !mine(p) ? fs.statSync(p, ...rest) :
182
+ from ? fs.statSync(from, ...rest) :
183
+ { mtimeMs, isFile: () => true, isDirectory: () => false },
184
+ }
185
+ }
186
+
187
+
188
+ // Points each include of a .aon file at its .aontu successor. Strings and
189
+ // comments are skipped, so a path held as data or commented out is kept.
190
+ function rewriteAonIncludes(src: string): string {
191
+ let out = ''
192
+ let i = 0
193
+
194
+ while (i < src.length) {
195
+ const c = src[i]
196
+ let end = i + 1
197
+ let retarget = false
198
+
199
+ if ('#' === c) {
200
+ end = src.indexOf('\n', i)
201
+ end = -1 === end ? src.length : end
202
+ }
203
+ else if (QUOTES.includes(c)) {
204
+ end = stringEnd(src, i).end
205
+ }
206
+ else if ('@' === c) {
207
+ let q = end
208
+ while (q < src.length && SPACE.includes(src[q])) {
209
+ q++
210
+ }
211
+ if (q < src.length && QUOTES.includes(src[q])) {
212
+ const str = stringEnd(src, q)
213
+ end = str.end
214
+ retarget = str.closed && src.slice(q + 1, end - 1).endsWith('.aon')
215
+ }
216
+ }
217
+
218
+ out += retarget ?
219
+ src.slice(i, end - 1) + 'tu' + src[end - 1] : src.slice(i, end)
220
+ i = end
221
+ }
222
+
223
+ return out
224
+ }
225
+
226
+
227
+ // A string ends at its unescaped closing quote, or, unterminated, at its
228
+ // line; a backtick string may span lines.
229
+ function stringEnd(src: string, start: number): { end: number, closed: boolean } {
230
+ const quote = src[start]
231
+ let i = start + 1
232
+ while (i < src.length) {
233
+ const c = src[i]
234
+ if ('\\' === c) {
235
+ i += 2
236
+ }
237
+ else if (quote === c) {
238
+ return { end: i + 1, closed: true }
239
+ }
240
+ else if ('\n' === c && '`' !== quote) {
241
+ return { end: i, closed: false }
242
+ }
243
+ else {
244
+ i++
245
+ }
246
+ }
247
+ return { end: src.length, closed: false }
248
+ }
249
+
250
+
251
+ export {
252
+ Config,
253
+ BuildSpec,
254
+ CONFIG_FILE,
255
+ LEGACY_CONFIG_FILE,
256
+ prepareConfig,
257
+ readBack,
258
+ rewriteAonIncludes,
259
+ }
260
+
261
+ export type {
262
+ ConfigPrep,
263
+ }
47
264
 
48
265
 
49
266
 
package/src/init.ts CHANGED
@@ -4,9 +4,9 @@ import Path from 'node:path'
4
4
 
5
5
 
6
6
  const STARTER_MODEL = `# Voxgig model. Edit this file, then build it:
7
- # voxgig-model model/model.aon
7
+ # voxgig-model model/model.aontu
8
8
  #
9
- # Models are unified .aon - add types, defaults, references, imports.
9
+ # Models are unified .aontu - add types, defaults, references, imports.
10
10
  # Tutorial: https://github.com/voxgig/model/blob/main/docs/tutorial.md
11
11
 
12
12
  name: 'my-model'
@@ -35,8 +35,8 @@ type InitResult = {
35
35
  function initModel(dir: string, fs: any): InitResult {
36
36
  const d = dir || '.'
37
37
  const files: [string, string][] = [
38
- [Path.join(d, 'model', 'model.aon'), STARTER_MODEL],
39
- [Path.join(d, 'model', '.model-config', 'model-config.aon'), STARTER_CONFIG],
38
+ [Path.join(d, 'model', 'model.aontu'), STARTER_MODEL],
39
+ [Path.join(d, 'model', '.model-config', 'model-config.aontu'), STARTER_CONFIG],
40
40
  ]
41
41
 
42
42
  const created: string[] = []
package/src/model.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  /* Copyright © 2021-2025 Voxgig Ltd, MIT License. */
2
2
 
3
3
 
4
- import * as NodeFs from 'node:fs'
4
+ // Not a namespace import, whose copy reads the deprecated F_OK getters.
5
+ import NodeFs from 'node:fs'
5
6
 
6
7
  import { memfs as MemFs } from 'memfs'
7
8
 
@@ -20,7 +21,7 @@ import type {
20
21
  } from './types'
21
22
 
22
23
 
23
- import { Config } from './config'
24
+ import { Config, CONFIG_FILE, prepareConfig, readBack } from './config'
24
25
  import { Watch } from './watch'
25
26
 
26
27
  import { model_producer } from './producer/model'
@@ -43,7 +44,7 @@ class Model {
43
44
  constructor(mspec: ModelSpec) {
44
45
  const self = this
45
46
 
46
- this.fs = { ...(mspec.fs || NodeFs) }
47
+ this.fs = copyFs(mspec.fs || NodeFs)
47
48
 
48
49
  if (mspec.dryrun) {
49
50
  makeReadOnly(this.fs)
@@ -83,10 +84,6 @@ class Model {
83
84
 
84
85
  if (self.trigger_model) {
85
86
 
86
- // TODO: better design
87
- // Point the config's last result at the current build so the model
88
- // producer reads fresh config state. It must be a thunk to satisfy
89
- // BuildResult.build's `() => Build` contract (consumers call it).
90
87
  const lastConfig = self.build.use?.config?.watch?.last
91
88
  if (lastConfig) {
92
89
  lastConfig.build = () => build
@@ -191,50 +188,11 @@ class Model {
191
188
 
192
189
 
193
190
  function makeConfig(mspec: ModelSpec, log: Log, fs: any, trigger_model_build: ProducerDef) {
194
- let cbase = mspec.base + '/.model-config'
195
- let cpath = cbase + '/model-config.aon'
196
-
197
- // MIGRATE A LEGACY .aontu CONFIG RATHER THAN WRITING OVER IT. This block
198
- // CREATES the config when it finds none, so looking only for `.aon` in a
199
- // project that has a `model-config.aontu` would not read the old file — it
200
- // would decide there is no config and write a fresh default beside it,
201
- // silently discarding whatever the project had declared there.
202
- const legacycpath = cbase + '/model-config.aontu'
203
- if (!fs.existsSync(cpath) && fs.existsSync(legacycpath)) {
204
- // NOT A VERBATIM COPY. This package's OWN config moved to .aon in v10, so
205
- // a legacy config's import of it names a file that no longer ships and the
206
- // migrated config fails to resolve - `aontu/multisource_not_found:
207
- // @voxgig/model/model/.model-config/model-config.aontu` - on the first
208
- // build after upgrading. Renaming the file without retargeting that import
209
- // just moves the breakage.
210
- //
211
- // Only THIS package's import is retargeted, and only where it is an
212
- // IMPORT. Two things are deliberately left alone:
213
- //
214
- // - a project's own `.aontu` imports, which still name real files on
215
- // its disk that nothing here renamed;
216
- // - this same pathname held as ordinary string DATA (a note, a
217
- // compatibility path in action metadata).
218
- //
219
- // Hence the match is anchored to aontu's `@"..."` import syntax, closing
220
- // quote included, rather than to the bare pathname. Both are declarations
221
- // the migration exists to preserve, and silently editing one during a
222
- // one-time migration is precisely the failure this whole block guards
223
- // against.
224
- const legacy = fs.readFileSync(legacycpath, 'utf8')
225
- fs.writeFileSync(cpath, legacy.replace(
226
- /@(\s*)"(@voxgig\/model\/[^"]*model-config)\.aontu"/g, '@$1"$2.aon"'))
227
- try { fs.unlinkSync(legacycpath) } catch (_err: any) { }
228
- }
229
-
230
- if (!fs.existsSync(cpath)) {
231
- fs.mkdirSync(cbase, { recursive: true })
232
- fs.writeFileSync(cpath, `
233
- @"@voxgig/model/model/.model-config/model-config.aon"
191
+ const cbase = mspec.base + '/.model-config'
192
+ const cpath = cbase + '/' + CONFIG_FILE
234
193
 
235
- sys: model: action: {}
236
- `)
237
- }
194
+ const prep = prepareConfig(fs, cbase, log, mspec.dryrun)
195
+ const cfs = null == prep.text ? fs : readBack(fs, cpath, prep.text, prep.from)
238
196
 
239
197
  let cspec: BuildSpec = {
240
198
  name: 'config',
@@ -254,10 +212,26 @@ sys: model: action: {}
254
212
  ],
255
213
  require: mspec.require,
256
214
  log,
257
- fs,
215
+ fs: cfs,
258
216
  }
259
217
 
260
- return new Config(cspec, log)
218
+ return new Config(cspec, log, prep)
219
+ }
220
+
221
+
222
+ const ACCESS_MODES = ['F_OK', 'R_OK', 'W_OK', 'X_OK']
223
+
224
+
225
+ // A spread skips the access modes where fs hides them behind deprecated
226
+ // getters, so they come back from fs.constants, which holds the same values.
227
+ function copyFs(fs: any): any {
228
+ const copy = { ...fs }
229
+ for (const mode of ACCESS_MODES) {
230
+ if (undefined === copy[mode] && fs.constants) {
231
+ copy[mode] = fs.constants[mode]
232
+ }
233
+ }
234
+ return copy
261
235
  }
262
236
 
263
237
 
@@ -14,12 +14,8 @@ const local_producer: Producer = async (build: Build, ctx: BuildContext) => {
14
14
  if (null == actionDefs) {
15
15
  actionDefs = ctx.state.local.actionDefs = []
16
16
 
17
- // TODO: need to provide project root via build
18
17
  let root = Path.resolve(build.path, '..', '..')
19
18
 
20
- // TODO: build should do this
21
- // Config is optional: with no .model-config build linked in, there are no
22
- // declared actions and the model runs on its own.
23
19
  let configBuildResult = build.use.config?.watch?.last
24
20
  let configBuild = configBuildResult?.build()
25
21
  let config = configBuild?.model || {}
@@ -75,7 +71,6 @@ const local_producer: Producer = async (build: Build, ctx: BuildContext) => {
75
71
 
76
72
  for (let actionDef of runActionDefs) {
77
73
  try {
78
- // TODO: this call signature needs to be well-defined as it is an external interface
79
74
  let ares = await actionDef.action(build.model, build, ctx)
80
75
  ok = ok && (null == ares || !!ares.ok)
81
76
  reload = reload || ares?.reload
@@ -4,17 +4,6 @@ import Path from 'path'
4
4
  import type { Build, Producer, BuildContext, ProducerResult } from '../types'
5
5
 
6
6
 
7
- // Serialize the model to two-space-indented JSON with object keys in strictly
8
- // lexical (UTF-8 byte) order, byte-for-byte identical to the Go
9
- // implementation's encoding/json. JSON.stringify cannot express this: JS
10
- // objects iterate integer-like keys ("9", "10") in numeric order ahead of the
11
- // other keys regardless of insertion order, so the order must be imposed
12
- // during serialization, and the default JS string sort compares UTF-16 code
13
- // units, which disagrees with Go's byte order for astral-plane keys. Arrays
14
- // keep their order. Values only producer mutation can introduce mirror
15
- // JSON.stringify: undefined, functions, and symbols are dropped from objects
16
- // and become null in arrays (sparse holes too), and toJSON results are fed
17
- // back through the canonical serializer.
18
7
  function jsonify(value: any, indent: string): string {
19
8
  if (Array.isArray(value)) {
20
9
  if (0 === value.length) {
@@ -54,9 +43,6 @@ function jsonify(value: any, indent: string): string {
54
43
  }
55
44
 
56
45
 
57
- // JSON.stringify, plus the U+2028/U+2029 escapes Go's encoding/json always
58
- // applies even with HTML escaping off. JSON.stringify emits the separators
59
- // literally (both forms are valid JSON), so escape them here for byte parity.
60
46
  function jstr(value: any): string | undefined {
61
47
  const out = JSON.stringify(value)
62
48
  return undefined === out ? undefined :