photostructure 2026.10.0 → 2026.10.3
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/LICENSE.md +8 -1
- package/VERSION.json +5 -5
- package/bin/docker-env.js +5 -5
- package/bin/doctor.js +84 -89
- package/bin/fix.js +80 -85
- package/bin/info.js +66 -71
- package/bin/list.js +59 -64
- package/bin/logcat.js +43 -48
- package/bin/logtail.js +42 -47
- package/bin/main.js +70 -62
- package/bin/photostructure.js +4 -4
- package/bin/sync.js +93 -98
- package/bin/web.js +139 -120
- package/bin/worker.js +47 -52
- package/data/migrations/models/20261021_clear_rejected_files.sql +6 -0
- package/data/migrations/models/20261022_drop_asset_file_image_data_hash.sql +13 -0
- package/data/models-schema.json +0 -6
- package/data/models-schema.sql +0 -5
- package/defaults.env +106 -89
- package/package.json +7 -7
- package/public/3rd-party-licenses.html.gz +0 -0
- package/public/3rd-party-licenses.txt.gz +0 -0
- package/public/app/AnimatedNumber.js +1 -1
- package/public/app/AnimatedNumber.js.gz +0 -0
- package/public/app/AssetGallery.js +1 -1
- package/public/app/DropDown.js +2 -2
- package/public/app/DropDown.js.gz +0 -0
- package/public/app/HealthChecks.js +1 -1
- package/public/app/HealthChecks.js.gz +0 -0
- package/public/app/Lazy.js +1 -1
- package/public/app/Lazy.js.gz +0 -0
- package/public/app/Modal.js +1 -1
- package/public/app/Modal.js.gz +0 -0
- package/public/app/NavMenuButton.js +3 -3
- package/public/app/NavMenuButton.js.gz +0 -0
- package/public/app/PageActionsMenu.js +1 -1
- package/public/app/PageActionsMenu.js.gz +0 -0
- package/public/app/PlusTrialOffer.js +8 -0
- package/public/app/ProgressState.js +1 -1
- package/public/app/ProgressState.js.gz +0 -0
- package/public/app/SSEChannels.js +1 -1
- package/public/app/SSEChannels.js.gz +0 -0
- package/public/app/Search.js +1 -1
- package/public/app/Search.js.gz +0 -0
- package/public/app/Spinner.js +5 -5
- package/public/app/Spinner.js.gz +0 -0
- package/public/app/Tag.js +1 -1
- package/public/app/Tag.js.gz +0 -0
- package/public/app/about.js +1 -1
- package/public/app/about.js.gz +0 -0
- package/public/app/app.css +1 -1
- package/public/app/app.css.gz +0 -0
- package/public/app/app.js +4 -4
- package/public/app/app.js.gz +0 -0
- package/public/app/assets/sse-worker-DM-4CYA4.js +8 -0
- package/public/app/assets/sse-worker-DM-4CYA4.js.gz +0 -0
- package/public/app/health.js +2 -2
- package/public/app/health.js.gz +0 -0
- package/public/app/logs.js +1 -1
- package/public/app/logs.js.gz +0 -0
- package/public/app/platform.js +1 -1
- package/public/app/roboto-mono-v22-latin-700.woff2.gz +0 -0
- package/public/app/roboto-mono-v22-latin-regular.woff2.gz +0 -0
- package/public/app/roboto-v51-latin-wght.woff2.gz +0 -0
- package/public/app/sync.js +12 -3
- package/public/app/sync.js.gz +0 -0
- package/public/app/useAnchorHighlight.js +1 -1
- package/public/eula.html +7 -1
- package/public/js/confetti.min.js +3 -0
- package/tools/licenses/canvas-confetti/LICENSE.txt +15 -0
- package/views/eula.html +7 -1
- package/views/settings.ejs +8 -19
- package/views/welcome-tools.ejs +7 -3
- package/public/app/sse-worker.js +0 -8
- package/public/app/sse-worker.js.gz +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
**Version:
|
|
1
|
+
**Version: October 24, 2026.** Effective when you accept it. See "Changes and
|
|
2
2
|
other terms" below for later revisions.
|
|
3
3
|
|
|
4
4
|
This agreement is between you and PhotoStructure, Inc. ("we" or "us") for the
|
|
@@ -41,6 +41,13 @@ applicable law or included components' licenses. See the
|
|
|
41
41
|
and notices with your installation for copying, modification, and redistribution
|
|
42
42
|
rights.
|
|
43
43
|
|
|
44
|
+
If you ask it to, PhotoStructure can install separate third-party tools, such
|
|
45
|
+
as photo and video tools and the package manager that installs them. Those
|
|
46
|
+
tools are not part of the Software: we do not distribute, warrant, or support them, and their
|
|
47
|
+
own licenses apply. Some may require patent
|
|
48
|
+
licenses depending on where and how you use them, and you are responsible for
|
|
49
|
+
any you need.
|
|
50
|
+
|
|
44
51
|
## Privacy and updates
|
|
45
52
|
|
|
46
53
|
**PhotoStructure does not send your photos or videos to us.** Application error
|
package/VERSION.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026.10.
|
|
2
|
+
"version": "2026.10.3",
|
|
3
3
|
"versionMajor": 2026,
|
|
4
4
|
"versionMinor": 10,
|
|
5
|
-
"versionPatch":
|
|
5
|
+
"versionPatch": 3,
|
|
6
6
|
"versionPrerelease": [],
|
|
7
|
-
"release": "2026.10.
|
|
8
|
-
"gitSha": "
|
|
9
|
-
"gitDate": "2026-10-
|
|
7
|
+
"release": "2026.10.3+20261028130733",
|
|
8
|
+
"gitSha": "df99c668045a0877b089e0f1c1dfd7275fcdbe33",
|
|
9
|
+
"gitDate": "2026-10-28T20:07:33.000Z"
|
|
10
10
|
}
|
package/bin/docker-env.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// https://photostructure.com/eula
|
|
5
5
|
// IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THIS SOFTWARE
|
|
6
6
|
"use strict";
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="65a152ce-5c4a-5d68-9b97-f6266f1ebda9")}catch(e){}}();
|
|
8
8
|
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(e,t)=>function(){try{return t||(0,e[__getOwnPropNames(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of __getOwnPropNames(t))!__hasOwnProp.call(e,i)&&i!==n&&__defProp(e,i,{get:()=>t[i],enumerable:!(r=__getOwnPropDesc(t,i))||r.enumerable});return e},__toESM=(e,t,n)=>(n=e==null?{}:__create(__getProtoOf(e)),__copyProps(t||!e||!e.__esModule?__defProp(n,`default`,{value:e,enumerable:!0}):n,e)),require_parser=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/parser.js"(e,t){var n=1114112,r=class e extends Error{constructor(t,n,r){super(`[ParserError] `+t,n,r),this.name=`ParserError`,this.code=`ParserError`,Error.captureStackTrace&&Error.captureStackTrace(this,e)}},i=class{constructor(e){this.parser=e,this.buf=``,this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},a=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf=``,this.char=null,this.ii=0,this.state=new i(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let t;for(;t===!1||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=n;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!=`function`)throw new r(`Tried to set state to non-existent state: `+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new i(e)}callNow(e,t){return this.call(e,t),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new r(`Stack underflow`));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===n)throw this.error(new r(`Unexpected end-of-buffer`));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new r(`Must declare a parseStart method`)}};a.END=n,a.Error=r,t.exports=a}}),require_create_datetime=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime.js"(e,t){t.exports=e=>{let t=new Date(e);if(isNaN(t))throw TypeError(`Invalid Datetime`);return t}}}),require_format_num=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/format-num.js"(e,t){t.exports=(e,t)=>{for(t=String(t);t.length<e;)t=`0`+t;return t}}}),require_create_datetime_float=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime-float.js"(e,t){var n=require_format_num(),r=class extends Date{constructor(e){super(e+`Z`),this.isFloating=!0}toISOString(){return`${`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}T${`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}`}};t.exports=e=>{let t=new r(e);if(isNaN(t))throw TypeError(`Invalid Datetime`);return t}}}),require_create_date=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-date.js"(e,t){var n=require_format_num(),r=global.Date,i=class extends r{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}};t.exports=e=>{let t=new i(e);if(isNaN(t))throw TypeError(`Invalid Datetime`);return t}}}),require_create_time=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-time.js"(e,t){var n=require_format_num(),r=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}};t.exports=e=>{let t=new r(e);if(isNaN(t))throw TypeError(`Invalid Datetime`);return t}}}),require_toml_parser=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/toml-parser.js"(exports,module){module.exports=makeParserClass(require_parser()),module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name=`TomlError`,Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;var createDateTime=require_create_datetime(),createDateTimeFloat=require_create_datetime_float(),createDate=require_create_date(),createTime=require_create_time(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:`\b`,[CHAR_t]:` `,[CHAR_n]:`
|
|
9
9
|
`,[CHAR_f]:`\f`,[CHAR_r]:`\r`,[CHAR_QUOT]:`"`,[CHAR_BSOL]:`\\`};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol(`type`),_declared=Symbol(`declared`),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t===`__proto__`&&defineProperty(e,`__proto__`,descriptor),!1)}var INLINE_TABLE=Symbol(`inline-table`);function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return typeof e!=`object`||!e?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol(`table`);function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return typeof e!=`object`||!e?!1:e[_type]===TABLE}var _contentType=Symbol(`content-type`),INLINE_LIST=Symbol(`inline-list`);function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return typeof e!=`object`||!e?!1:e[_type]===INLINE_LIST}var LIST=Symbol(`list`);function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return typeof e!=`object`||!e?!1:e[_type]===LIST}var _custom;try{const utilInspect=eval(`require('util').inspect`);_custom=utilInspect.custom}catch{}var _inspect=_custom||`inspect`,BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol(`integer`);function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return typeof e!=`object`||!e?!1:e[_type]===INTEGER}var FLOAT=Symbol(`float`);function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return typeof e!=`object`||!e?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t===`object`){if(e===null)return`null`;if(e instanceof Date)return`datetime`;if(_type in e)switch(e[_type]){case INLINE_TABLE:return`inline-table`;case INLINE_LIST:return`inline-list`;case TABLE:return`table`;case LIST:return`list`;case FLOAT:return`float`;case INTEGER:return`integer`}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError(`Unexpected character, expected only whitespace or comments till end of line`))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError(`Can't redefine existing key`));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError(`Can't redefine existing key`));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError(`Invalid character, expected "="`))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError(`Can't redefine existing key`));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,e))this.ctx=this.ctx[e]=Table();else if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else throw this.error(new TomlError(`Can't redefine existing key`));return this.next(this.parseTableNext)}throw this.error(new TomlError(`Unexpected character, expected whitespace, . or ]`))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError(`Can't extend an inline array`));if(isList(this.ctx[e])){let t=Table();this.ctx[e].push(t),this.ctx=t}else throw this.error(new TomlError(`Can't redefine an existing key`));return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,e))this.ctx=this.ctx[e]=Table();else if(isInlineList(this.ctx[e]))throw this.error(new TomlError(`Can't extend an inline array`));else if(isInlineTable(this.ctx[e]))throw this.error(new TomlError(`Can't extend an inline table`));else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else throw this.error(new TomlError(`Can't redefine an existing key`));return this.next(this.parseListNext)}throw this.error(new TomlError(`Unexpected character, expected whitespace, . or ]`))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError(`Unexpected character, expected whitespace, . or ]`))}parseValue(){if(this.char===e.END)throw this.error(new TomlError(`Key without value`));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError(`Unexpected character, expecting string, number, datetime, boolean, inline array or inline table`))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError(`Unexpected character, expected "inf", "+inf" or "-inf"`))}parseInf2(){if(this.char===CHAR_f)return this.state.buf===`-`?this.return(-1/0):this.return(1/0);throw this.error(new TomlError(`Unexpected character, expected "inf", "+inf" or "-inf"`))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError(`Unexpected character, expected "nan"`))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError(`Unexpected character, expected "nan"`))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError(`Key ended without value`));if(isAlphaNumHyphen(this.char))this.consume();else if(this.state.buf.length===0)throw this.error(new TomlError(`Empty bare keys are not allowed`));else return this.returnNow()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError(`Unterminated string`));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError(`Unterminated multi-line string`));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+=`'`,this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+=`''`,this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError(`Unterminated string`));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError(`Unterminated multi-line string`));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e=`\\u00`;return this.char<16&&(e+=`0`),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+=`"`,this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+=`""`,this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError(`Can't escape whitespace`))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError(`Unknown escape character: `+this.char))}parseUnicodeReturn(e){try{let t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError(`Invalid unicode, character in range 0xD800 - 0xDFFF is reserved`));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError(`Invalid character in unicode sequence, expected hex`));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError(`Invalid character in unicode sequence, expected hex`));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);else{let e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError(`Invalid number`));return this.returnNow(e)}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError(`Unexpected character, expected digit`));if(this.atEndOfWord())throw this.error(new TomlError(`Incomplete number`));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError(`Unexpected character, expected digit`));if(this.atEndOfWord())throw this.error(new TomlError(`Incomplete number`));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else return this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError(`Unexpected character, expected -, + or digit`))}parseNumberExponent(){if(isDigit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);else return this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);else if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);else if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);else return this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError(`Expected digit while parsing year part of a date`))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError(`Expected hyphen (-) while parsing year part of date`))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);else{let e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError(`Invalid number`));return this.returnNow(e)}}parseIntegerOct(){if(isOctit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);else{let e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError(`Invalid number`));return this.returnNow(e)}}parseIntegerBin(){if(isBit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);else{let e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError(`Invalid number`));return this.returnNow(e)}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError(`Years less than 1000 must be zero padded to four characters`));return this.state.result=this.state.buf,this.state.buf=``,this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError(`Months less than 10 must be zero padded to two characters`));return this.state.result+=`-`+this.state.buf,this.state.buf=``,this.next(this.parseDateDay)}if(isDigit(this.char))this.consume();else throw this.error(new TomlError(`Incomplete datetime`))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError(`Days less than 10 must be zero padded to two characters`));return this.state.result+=`-`+this.state.buf,this.state.buf=``,this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+`-`+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError(`Incomplete datetime`))}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError(`Hours less than 10 must be zero padded to two characters`));return this.state.result+=`T`+this.state.buf,this.state.buf=``,this.next(this.parseTimeMin)}if(isDigit(this.char))this.consume();else throw this.error(new TomlError(`Incomplete datetime`))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=`:`+this.state.buf,this.state.buf=``,this.next(this.parseTimeSec);else throw this.error(new TomlError(`Incomplete datetime`))}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=`:`+this.state.buf,this.state.buf=``,this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError(`Incomplete datetime`))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError(`Hours less than 10 must be zero padded to two characters`));return this.state.result=this.state.buf,this.state.buf=``,this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError(`Incomplete time`))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=`:`+this.state.buf,this.state.buf=``,this.next(this.parseOnlyTimeSec);else throw this.error(new TomlError(`Incomplete time`))}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError(`Incomplete time`))}parseOnlyTimeFractionMaybe(){if(this.state.result+=`:`+this.state.buf,this.char===CHAR_PERIOD)this.state.buf=``,this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError(`Expected digit in milliseconds`));return this.returnNow(createTime(this.state.result+`.`+this.state.buf))}else throw this.error(new TomlError(`Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z`))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));else throw this.error(new TomlError(`Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z`))}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else if(this.state.buf.length===1)throw this.error(new TomlError(`Expected digit in milliseconds`));else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));else throw this.error(new TomlError(`Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z`))}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError(`Unexpected character in datetime, expected digit`))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError(`Unexpected character in datetime, expected colon`))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError(`Unexpected character in datetime, expected digit`))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError(`Invalid boolean, expected true or false`))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError(`Unterminated inline array`));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){let t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError(`Invalid character, expected whitespace, comma (,) or close bracket (])`))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError(`Unterminated inline array`));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError(`Can't redefine existing key`));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError(`Can't redefine existing key`));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError(`Unterminated inline array`));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError(`Invalid character, expected whitespace, comma (,) or close bracket (])`))}}return t}}}),require_parse_pretty_error=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-pretty-error.js"(e,t){t.exports=n;function n(e,t){if(e.pos==null||e.line==null)return e;let n=e.message;if(n+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
10
10
|
`,t&&t.split){let r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length,a=` `;for(;a.length<i;)a+=` `;for(let t=Math.max(0,e.line-1);t<Math.min(r.length,e.line+2);++t){let o=String(t+1);if(o.length<i&&(o=` `+o),e.line===t){n+=o+`> `+r[t]+`
|
|
@@ -21,14 +21,14 @@ var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Obje
|
|
|
21
21
|
`:n+=` `+r.join(`, `)+(r.length>0?` `:``),n+`]`}function D(e){e=s(e);var t=[];return Object.keys(e).forEach(n=>{t.push(d(n)+` = `+_(e[n],!1))}),`{ `+t.join(`, `)+(t.length>0?` `:``)+`}`}function O(e,t,n,i){var a=u(i);if(a===`array`)return k(e,t,n,i);if(a===`table`)return A(e,t,n,i);throw r(a)}function k(e,t,n,i){i=s(i),T(i);var a=u(i[0]);if(a!==`table`)throw r(a);var o=e+d(n),l=``;return i.forEach(e=>{l.length>0&&(l+=`
|
|
22
22
|
`),l+=t+`[[`+o+`]]
|
|
23
23
|
`,l+=c(o+`.`,t,e)}),l}function A(e,t,n,r){var i=e+d(n),o=``;return a(r).length>0&&(o+=t+`[`+i+`]
|
|
24
|
-
`),o+c(i+`.`,t,r)}}}),require_toml=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/toml.js"(e){e.parse=require_parse(),e.stringify=require_stringify()}}),import_node_process=__toESM(require("node:process")),CliDesc=Object.freeze({main:`PhotoStructure's main process manager. Runs and manages web and sync services.`,desktop:`PhotoStructure for Desktops. Manages web and sync services.`,fix:`PhotoStructure's library settings and database check and repair tool.`,info:`PhotoStructure's configuration, file metadata and aggregation diagnostics tool.`,doctor:`Report PhotoStructure's health checks.`,list:`List items in a PhotoStructure Library.`,logcat:`Chronologically sort and pretty-print PhotoStructure's log files.`,logtail:"View the log messages of currently-running PhotoStructure processes as they are emitted. (Like `tail -f`).",web:`PhotoStructure's web service. Automatically started by main. For more details see https://photostructure.com/tools`,sync:`PhotoStructure's directory synchronization service. Automatically started by main, but can be run manually. For more details see https://photostructure.com/go/sync`,"docker-env":`PhotoStructure for Docker's startup environment resolver. For internal use.`,test:`Test harness. For internal use.`,worker:`PhotoStructure's worker process. For internal use.`}),version=`2026.10.
|
|
24
|
+
`),o+c(i+`.`,t,r)}}}),require_toml=__commonJS({"../core/node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/toml.js"(e){e.parse=require_parse(),e.stringify=require_stringify()}}),import_node_process=__toESM(require("node:process")),CliDesc=Object.freeze({main:`PhotoStructure's main process manager. Runs and manages web and sync services.`,desktop:`PhotoStructure for Desktops. Manages web and sync services.`,fix:`PhotoStructure's library settings and database check and repair tool.`,info:`PhotoStructure's configuration, file metadata and aggregation diagnostics tool.`,doctor:`Report PhotoStructure's health checks.`,list:`List items in a PhotoStructure Library.`,logcat:`Chronologically sort and pretty-print PhotoStructure's log files.`,logtail:"View the log messages of currently-running PhotoStructure processes as they are emitted. (Like `tail -f`).",web:`PhotoStructure's web service. Automatically started by main. For more details see https://photostructure.com/tools`,sync:`PhotoStructure's directory synchronization service. Automatically started by main, but can be run manually. For more details see https://photostructure.com/go/sync`,"docker-env":`PhotoStructure for Docker's startup environment resolver. For internal use.`,test:`Test harness. For internal use.`,worker:`PhotoStructure's worker process. For internal use.`}),version=`2026.10.3`,import_node_fs2=require("node:fs"),import_node_os=require("node:os"),import_node_path4=require("node:path"),import_node_path=require("node:path");function dockerConfigDirs(e){return[{dir:`/ps/config`,preexistingDir:`/ps/config`},{dir:e+`/.photostructure/docker-config`,preexistingDir:e}]}function notBlank(e){return e!=null&&e.trim().length>0?e:void 0}var CacheDirSettingEnvKeys=[`PS_CACHE_DIR`,`PS_TMP_DIR`,`PS_TEMP_DIR`,`cacheDir`];function environmentCacheDir(){for(let e of CacheDirSettingEnvKeys){let t=notBlank(process.env[e]);if(t!=null)return t}let e=notBlank(process.env.XDG_CACHE_HOME);return e==null?void 0:import_node_path.posix.join(e,`photostructure`)}var import_node_fs=require("node:fs"),import_node_path2=require("node:path");function isError(e){return e!=null&&e instanceof Error}function toError(e){return e==null?void 0:isError(e)?e:Error(String(e))}var deferredComputations=new WeakSet;function defer(e){let t,n,r=!1,i=function(){if(r){if(n!=null)throw n;return t}try{return r=!0,t=e()}catch(e){throw n=toError(e),n}};return i.prior=()=>t,i.hasPrior=()=>r,i.applied=()=>r,i.reset=()=>{let e=t;return t=void 0,n=void 0,r=!1,e},deferredComputations.add(i),i}var SettingsToml=`settings.toml`,import_toml=__toESM(require_toml()),ByteOrderMarks=[{bom:[239,187,191],encoding:`utf8`},{bom:[255,254],encoding:`utf16le`}];function debom(e){for(let{bom:t,encoding:n}of ByteOrderMarks)if(t.every((t,n)=>e[n]===t))return e.subarray(t.length).toString(n);return e.toString()}var Smart2Dumb=[[/[‘’]/g,`'`],[/[“”„«»〃]/g,`"`]];function dumbquote(e){return Smart2Dumb.reduce((e,[t,n])=>e.replace(t,n),e).normalize()}function parseTomlBuffer(e){let t=debom(e);if(t.trim().length!==0)try{return(0,import_toml.parse)(dumbquote(t))}catch(e){throw tomlErrorWithoutSource(e)}}function tomlErrorForLog(e){if(typeof e!=`object`||!e)return e;let t=e;return t.fromTOML===!0?{name:typeof t.name==`string`?t.name:`TomlError`,...typeof t.line==`number`?{row:t.line+1}:{},...typeof t.col==`number`?{column:t.col+1}:{}}:e}function tomlErrorWithoutSource(e){let t=tomlErrorForLog(e);if(t===e)return e;let{row:n,column:r}=t,i=typeof n==`number`?` at row ${n}`:``,a=typeof r==`number`?`${i===``?` at`:`,`} column ${r}`:``,o=Error(`Invalid TOML${i}${a}`);return Object.assign(o,t),o}function lazyConfigSettings(e){return defer(()=>{let t=(0,import_node_path2.join)(e(),SettingsToml);try{return parseTomlBuffer((0,import_node_fs.readFileSync)(t))}catch(e){if(e.code===`ENOENT`)return;throw Error(`Cannot read ${t}: ${e}`,{cause:e})}})}var DefaultDockerLibraryDir=`/ps/library`,LibraryDirSettingNames=[`libraryDir`,`libraryPath`,`library`],DockerLibraryDirEnvKeys=[`PS_LIBRARY_DIR`,`PS_LIBRARY_PATH`,`PS_LIBRARY`],LibraryDirSettingEnvKeys=[...DockerLibraryDirEnvKeys,...LibraryDirSettingNames],import_promises=require("node:fs/promises"),import_node_path3=require("node:path");function parseEnvTokenPairs(e){let t={},n=e.replace(/\r\n?/g,`
|
|
25
25
|
`),r=/\s*#.*$|(?:export[\t ]*)?(?<key>[\w.-]+)[\t ]*[:=](?:(?<quote>["'`])(?<qval>(?:\\.|(?!\2)[\s\S])*)\2|(?<val>[^\s#]*))(?:[\t ]*#.*$)?(?:$|\s)/gim,i;for(;(i=r.exec(n))!=null;){let e=i.groups?.key;if(e==null)continue;let n=(i.groups?.qval??i.groups?.val??``).trim();i.groups?.quote===`"`&&(n=n.replace(/\\n/g,`
|
|
26
26
|
`).replace(/\\r/g,`\r`).replace(/\\"/g,`"`)),t[e]=n}return t}var PsEnvKeys=[`PS_ENV_FILE`,`PSENVFILE`,`PS_ENV`,`PSENV`];function psEnvFilesFor(e,t){let n=[`/.psenv`,(0,import_node_path3.join)(t,`.psenv`),...PsEnvKeys.flatMap(t=>(e[t]??``).split(import_node_path3.delimiter))],r=[],i=new Set;for(let e of n){let t=e.trim();t.length>0&&!i.has(t)&&(i.add(t),r.push(t))}return r}function mergePsEnv(e,t){for(let[n,r]of Object.entries(e))t[n]=r;return t}async function mergePsEnvFiles(e,t){let n=new Set(Object.keys(e));for await(let n of readPsEnvFiles(t))mergePsEnv(n,e);return Object.keys(e).filter(e=>!n.has(e))}async function*readPsEnvFiles(e){for(let t of e)try{yield parseEnvTokenPairs(debom(await(0,import_promises.readFile)(t)))}catch{}}function firstNonEmpty(...e){return e.find(e=>e!=null&&e.length>0)}function firstLibraryDirEnvValue(){for(let e of LibraryDirSettingEnvKeys){let t=process.env[e];if(t!=null)return t}}function unsetBlankDockerLibraryDirAliases(){let e=[];for(let t of DockerLibraryDirEnvKeys){let n=process.env[t];n!=null&¬Blank(n)==null&&(delete process.env[t],e.push(t))}return e}function stat(e){try{return(0,import_node_fs2.statSync)(e,{throwIfNoEntry:!1})}catch{return}}function dockerHomeDir(){let e=process.env.HOME?.trim();return e!=null&&stat(e)?.isDirectory()===!0?(0,import_node_path4.resolve)(e):(0,import_node_os.homedir)()}function dockerConfigDir(e){let t=dockerConfigDirs(notBlank(e)??DefaultDockerLibraryDir);return firstNonEmpty(process.env.PS_CONFIG_DIR)??(stat(t[0].dir)?.isDirectory()===!0?t[0].dir:t[1].dir)}function errorMessage(e){return e instanceof Error?e.message:String(e)}function persistedSettingDir(e,t){try{let n=e(),r;for(let[e,i]of Object.entries(n??{}))t.some(t=>t.toLowerCase()===e.toLowerCase())&&typeof i==`string`&&(r=i);return r!=null&&(0,import_node_path4.isAbsolute)(r)?r:void 0}catch(e){process.stderr.write(`${errorMessage(e)}
|
|
27
27
|
`);return}}function ownerIds(e,t){for(let n of[(0,import_node_path4.join)(e,SettingsToml),(0,import_node_path4.join)(t,`.photostructure`,SettingsToml),(0,import_node_path4.join)(t,`.photostructure`),e,t]){let e=stat(n);if(e!=null)return{uid:e.uid.toString(),gid:e.gid.toString()}}return{uid:`0`,gid:`0`}}function dockerEntrypointDropPrivileges({puid:e,realUid:t}){return t===0&&e!==`0`?`1`:``}async function resolveDockerEntrypointEnv(e={}){await mergePsEnvFiles(process.env,e.psEnvFiles??psEnvFilesFor(process.env,dockerHomeDir()));let t=unsetBlankDockerLibraryDirAliases(),n=firstLibraryDirEnvValue(),r=dockerConfigDir(n),i=lazyConfigSettings(()=>r),a=notBlank(n)??persistedSettingDir(i,LibraryDirSettingEnvKeys)??DefaultDockerLibraryDir,o=environmentCacheDir()??persistedSettingDir(i,CacheDirSettingEnvKeys),s=ownerIds(r,a),c=firstNonEmpty(process.env.PUID,process.env.puid)??s.uid;return{PS_LIBRARY_DIR:a,PS_CONFIG_DIR:r,PUID:c,PGID:firstNonEmpty(process.env.PGID,process.env.pgid)??s.gid,DROP_PRIVILEGES:dockerEntrypointDropPrivileges({puid:c,realUid:process.getuid?.()}),CHOWN_CACHE_DIR:o!=null&&(0,import_node_path4.isAbsolute)(o)&&!containsDir(o,a)?o:``,unset:t}}function containsDir(e,t){let n=(0,import_node_path4.relative)(e,t);return n===``||!n.startsWith(`..`)&&!(0,import_node_path4.isAbsolute)(n)}function shellQuote(e){return`'${e.replace(/'/g,`'\\''`)}'`}function renderDockerEntrypointEnv(e){return[...e.unset.map(e=>`unset ${e}`),`export PS_LIBRARY_DIR=${shellQuote(e.PS_LIBRARY_DIR)}`,`export PS_CONFIG_DIR=${shellQuote(e.PS_CONFIG_DIR)}`,`export PUID=${shellQuote(e.PUID)}`,`export PGID=${shellQuote(e.PGID)}`,`DROP_PRIVILEGES=${shellQuote(e.DROP_PRIVILEGES)}`,`CHOWN_CACHE_DIR=${shellQuote(e.CHOWN_CACHE_DIR)}`,``].join(`
|
|
28
28
|
`)}function printHelp(){import_node_process.default.stdout.write([`Usage: docker-env [options]`,``,CliDesc[`docker-env`],``,`Options:`,` -V, --version output the version number`,` -h, --help display help for command`,``].join(`
|
|
29
|
-
`))}async function main(){if(import_node_process.default.argv.includes(`--help`)||import_node_process.default.argv.includes(`-h`))
|
|
30
|
-
`);
|
|
29
|
+
`))}async function main(){if(import_node_process.default.argv.includes(`--help`)||import_node_process.default.argv.includes(`-h`))printHelp();else if(import_node_process.default.argv.includes(`--version`)||import_node_process.default.argv.includes(`-V`))import_node_process.default.stdout.write(version+`
|
|
30
|
+
`);else try{import_node_process.default.stdout.write(renderDockerEntrypointEnv(await resolveDockerEntrypointEnv()))}catch(e){import_node_process.default.stderr.write((e instanceof Error?e.stack??e.message:String(e))+`
|
|
31
31
|
`),import_node_process.default.exitCode=1}}main();
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
//# debugId=
|
|
34
|
+
//# debugId=65a152ce-5c4a-5d68-9b97-f6266f1ebda9
|