@zthun/romulator-client 1.1.0 → 1.2.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.
package/dist/index.cjs CHANGED
@@ -40,7 +40,7 @@ var ZRomulatorConfigGamesMetadata = /*#__PURE__*/ function() {
40
40
  {
41
41
  key: "gamesFolder",
42
42
  value: function gamesFolder() {
43
- return new helpfulQuery.ZMetadataBuilder().id("games-folder").path("gamesFolder").name("Games Folder").editable().file().build();
43
+ return new helpfulQuery.ZMetadataBuilder().id("games-folder").path("gamesFolder").name("Games Folder").fallback("${HOME}/Games").editable().file().build();
44
44
  }
45
45
  }
46
46
  ]);
@@ -164,7 +164,7 @@ var ZRomulatorConfigMediaMetadata = /*#__PURE__*/ function() {
164
164
  {
165
165
  key: "mediaFolder",
166
166
  value: function mediaFolder() {
167
- return new helpfulQuery.ZMetadataBuilder().id("media-folder").path("mediaFolder").name("Media Folder").editable().file().build();
167
+ return new helpfulQuery.ZMetadataBuilder().id("media-folder").path("mediaFolder").name("Media Folder").fallback("${HOME}/Games/.media").editable().file().build();
168
168
  }
169
169
  }
170
170
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/config/config-games-metadata.mts","../src/config/config-games.mts","../src/config/config-media-metadata.mts","../src/config/config.mts","../src/system/system-type.mts","../src/system/system.mts"],"sourcesContent":["import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigGamesMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigGamesMetadata.gamesFolder()];\n }\n\n public static gamesFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"games-folder\")\n .path(\"gamesFolder\")\n .name(\"Games Folder\")\n .editable()\n .file()\n .build();\n }\n}\n","export interface IZRomulatorConfigGames {\n gamesFolder?: string;\n}\n\nexport class ZRomulatorConfigGamesBuilder {\n private _config: IZRomulatorConfigGames = {};\n\n public gamesFolder(games: string): this {\n this._config.gamesFolder = games;\n return this;\n }\n\n public copy(other: IZRomulatorConfigGames) {\n this._config = structuredClone(other);\n return this;\n }\n\n public assign(other: Partial<IZRomulatorConfigGames>) {\n this._config = { ...this._config, ...other };\n return this;\n }\n\n public build(): IZRomulatorConfigGames {\n return structuredClone(this._config);\n }\n}\n","import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigMediaMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigMediaMetadata.mediaFolder()];\n }\n\n public static mediaFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"media-folder\")\n .path(\"mediaFolder\")\n .name(\"Media Folder\")\n .editable()\n .file()\n .build();\n }\n}\n","import { firstDefined } from \"@zthun/helpful-fn\";\nimport type { IZMetadata } from \"@zthun/helpful-query\";\nimport { castArray } from \"lodash-es\";\n\n/**\n * Represents a list of known config ids\n */\nexport enum ZRomulatorConfigId {\n /**\n * Config for games.\n */\n Games = \"games\",\n\n /**\n * Config id for media.\n */\n Media = \"media\",\n}\n\nexport interface IZRomulatorConfig<T = any> {\n id: ZRomulatorConfigId;\n name: string;\n\n avatar?: string;\n contents?: T;\n description?: string;\n file: string;\n metadata?: IZMetadata[];\n}\n\nexport class ZRomulatorConfigBuilder<T = any> {\n private _config: IZRomulatorConfig<T> = {\n id: ZRomulatorConfigId.Games,\n name: \"\",\n file: \"\",\n };\n\n public id(id: ZRomulatorConfigId) {\n this._config.id = id;\n return this;\n }\n\n public avatar(id: string) {\n this._config.avatar = id;\n return this;\n }\n\n public name(name: string) {\n this._config.name = name;\n return this;\n }\n\n public description(description: string) {\n this._config.description = description;\n return this;\n }\n\n public file(path: string) {\n this._config.file = path;\n return this;\n }\n\n public contents(contents?: T) {\n this._config.contents = contents;\n return this;\n }\n\n public metadata(meta: IZMetadata | IZMetadata[]) {\n const metadata = firstDefined([], this._config.metadata);\n this._config.metadata = metadata.concat(castArray(meta));\n return this;\n }\n\n public copy(other: IZRomulatorConfig<T>) {\n this._config = structuredClone(other);\n return this;\n }\n\n public build() {\n return structuredClone(this._config);\n }\n}\n","/**\n * Describes a type of system.\n */\nexport enum ZRomulatorSystemType {\n /**\n * A console system.\n */\n Console = \"console\",\n /**\n * A handheld system\n */\n Handheld = \"handheld\",\n /**\n * A cabinet system\n */\n Arcade = \"arcade\",\n /**\n * Known computer systems\n */\n Computer = \"computer\",\n}\n","import { uniq } from \"lodash-es\";\nimport { ZRomulatorSystemType } from \"./system-type.mjs\";\n\n/**\n * Represents a system in romulator.\n *\n * These are detected by the file system.\n * See ES-DE for the standard directory\n * structure.\n */\nexport interface IZRomulatorSystem {\n /**\n * Unique identifier for the system.\n *\n * If you think about the directory structure\n * for ES-DE, for example, the id would map to\n * the name of the system directory.\n *\n * This is essentially a slug.\n */\n id: string;\n /**\n * The canonical name of the system.\n *\n * This is the most globally recognized name,\n * not the historical accurate name for each\n * and every region.\n */\n name: string;\n /**\n * Other names that the system is known by.\n *\n * This helps with searching and scraping\n * media for systems that have multiple names\n * around the world.\n *\n * For example, the Nintendo Entertainment System\n * is known as the Famicom in Japan.\n */\n aliases: string[];\n /**\n * The generational index of the system.\n */\n generation: number;\n /**\n * The system manufacturers.\n *\n * There can be multiple manufacturers for a system.\n */\n manufacturers: string[];\n /**\n * The type of system.\n */\n type: ZRomulatorSystemType;\n}\n\n/**\n * A builder for creating an IZRomulatorSystem.\n */\nexport class ZRomulatorSystemBuilder {\n private _system: IZRomulatorSystem = {\n id: \"\",\n name: \"\",\n aliases: [],\n generation: 0,\n manufacturers: [],\n type: ZRomulatorSystemType.Console,\n };\n\n /**\n * Sets the id (slug) of the system.\n *\n * @param id -\n * The unique identifier for the system.\n * @returns\n * This instance.\n */\n public id(id: string): this {\n this._system.id = id;\n return this;\n }\n\n /**\n * Sets the canonical name of the system.\n *\n * @param name -\n * The canonical name of the system.\n * @returns\n * This instance.\n */\n public name(name: string): this {\n this._system.name = name;\n return this;\n }\n\n /**\n * Sets the system type.\n *\n * @param type -\n * The type of system.\n * @returns\n * This instance.\n */\n public type(type: ZRomulatorSystemType): this {\n this._system.type = type;\n return this;\n }\n\n /**\n * Sets the system type to console.\n *\n * @returns\n * This instance.\n */\n public console = this.type.bind(this, ZRomulatorSystemType.Console);\n\n /**\n * Sets the system type to handheld.\n *\n * @returns\n * This instance.\n */\n public handheld = this.type.bind(this, ZRomulatorSystemType.Handheld);\n\n /**\n * Sets the system type to arcade.\n *\n * @returns\n * This instance.\n */\n public arcade = this.type.bind(this, ZRomulatorSystemType.Arcade);\n\n /**\n * Sets the system type to computer.\n *\n * @returns\n * This instance.\n */\n public computer = this.type.bind(this, ZRomulatorSystemType.Computer);\n\n /**\n * Sets the aliases of the system.\n *\n * @param aliases -\n * The aliases of the system.\n * @returns\n * This instance.\n */\n public aliases(aliases: string[]): this {\n this._system.aliases = aliases;\n return this;\n }\n\n /**\n * Adds an alias to the system.\n *\n * If an alias already exists, then it will\n * not be added again.\n *\n * @param alias -\n * The alias to add to the system.\n * @returns\n * This instance.\n */\n public alias(alias: string): this {\n const aliases = this._system.aliases.slice();\n aliases.push(alias);\n return this.aliases(uniq(aliases));\n }\n\n /**\n * Sets the generational index of the system.\n *\n * @param generation -\n * The generational index of the system.\n * @returns\n * This instance.\n */\n public generation(generation: number): this {\n this._system.generation = generation;\n return this;\n }\n\n /**\n * Sets the manufacturers of the system.\n *\n * @param manufacturers -\n * The manufacturers of the system.\n * @returns\n * This instance.\n */\n public manufacturers(manufacturers: string[]): this {\n this._system.manufacturers = manufacturers;\n return this;\n }\n\n /**\n * Adds a manufacturer for the system.\n *\n * If a manufacturer already exists, then it will not be added again.\n *\n * @param manufacturer -\n * The manufacturer of the system.\n * @returns\n * This instance.\n */\n public manufacturer(manufacturer: string): this {\n const manufacturers = this._system.manufacturers.slice();\n manufacturers.push(manufacturer);\n return this.manufacturers(uniq(manufacturers));\n }\n\n /**\n * Builds the system instance.\n *\n * @returns\n * A structured clone of the current system\n * that has been built.\n */\n public build() {\n return structuredClone(this._system);\n }\n}\n"],"names":["ZRomulatorConfigGamesMetadata","all","gamesFolder","ZMetadataBuilder","id","path","name","editable","file","build","ZRomulatorConfigGamesBuilder","_define_property","_config","games","copy","other","structuredClone","assign","ZRomulatorConfigMediaMetadata","mediaFolder","ZRomulatorConfigId","ZRomulatorConfigBuilder","avatar","description","contents","metadata","meta","firstDefined","concat","castArray","ZRomulatorSystemType","ZRomulatorSystemBuilder","_system","aliases","generation","manufacturers","type","Console","console","bind","handheld","Handheld","arcade","Arcade","computer","Computer","alias","slice","push","uniq","manufacturer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAA,6BAAA,iBAAA,WAAA;AAAeA,IAAAA,SAAAA,6BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,6BAAAA,CAAAA;;AAAAA,IAAAA,eAAAA,CAAAA,6BAAAA,EAAAA,IAAAA,EAAAA;;YACNC,GAAAA,EAAAA,KAAAA;mBAAd,SAAcA,GAAAA,GAAAA;gBACZ,OAAO;AAFWD,oBAAAA,6BAAAA,CAEoBE,WAAW;AAAG,iBAAA;AACtD;;;YAEcA,GAAAA,EAAAA,aAAAA;mBAAd,SAAcA,WAAAA,GAAAA;AACZ,gBAAA,OAAO,IAAIC,6BAAAA,EAAAA,CACRC,EAAE,CAAC,gBACHC,IAAI,CAAC,aACLC,CAAAA,CAAAA,IAAI,CAAC,cACLC,CAAAA,CAAAA,QAAQ,EACRC,CAAAA,IAAI,GACJC,KAAK,EAAA;AACV;;;AAboBT,IAAAA,OAAAA,6BAAAA;AAcrB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZM,IAAA,4BAAA,iBAAA,WAAA;AAAMU,IAAAA,SAAAA,4BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,4BAAAA,CAAAA;AACX,QAAAC,kBAAA,CAAA,IAAA,EAAQC,WAAkC,E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OC,GAAAA,EAAAA,eAAAA;;;;;;;;MAAP,SAAOA,cAAcA,aAAuB,EAAA;AAC1C,gBAAA,IAAI,CAACH,OAAO,CAACG,aAAa,GAAGA,aAAAA;AAC7B,gBAAA,OAAO,IAAI;AACb;;;YAYOe,GAAAA,EAAAA,cAAAA;;;;;;;;;;MAAP,SAAOA,aAAaA,YAAoB,EAAA;AACtC,gBAAA,IAAMf,gBAAgB,IAAI,CAACH,OAAO,CAACG,aAAa,CAACY,KAAK,EAAA;AACtDZ,gBAAAA,aAAAA,CAAca,IAAI,CAACE,YAAAA,CAAAA;AACnB,gBAAA,OAAO,IAAI,CAACf,aAAa,CAACc,aAAKd,CAAAA,aAAAA,CAAAA,CAAAA;AACjC;;;YASO1B,GAAAA,EAAAA,OAAAA;;;;;;;AADN,MACD,SAAOA,KAAAA,GAAAA;gBACL,OAAOO,eAAAA,CAAgB,IAAI,CAACgB,OAAO,CAAA;AACrC;;;AAlKWD,IAAAA,OAAAA,uBAAAA;AAmKZ,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/config/config-games-metadata.mts","../src/config/config-games.mts","../src/config/config-media-metadata.mts","../src/config/config.mts","../src/system/system-type.mts","../src/system/system.mts"],"sourcesContent":["import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigGamesMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigGamesMetadata.gamesFolder()];\n }\n\n public static gamesFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"games-folder\")\n .path(\"gamesFolder\")\n .name(\"Games Folder\")\n .fallback(\"${HOME}/Games\")\n .editable()\n .file()\n .build();\n }\n}\n","export interface IZRomulatorConfigGames {\n gamesFolder?: string;\n}\n\nexport class ZRomulatorConfigGamesBuilder {\n private _config: IZRomulatorConfigGames = {};\n\n public gamesFolder(games: string): this {\n this._config.gamesFolder = games;\n return this;\n }\n\n public copy(other: IZRomulatorConfigGames) {\n this._config = structuredClone(other);\n return this;\n }\n\n public assign(other: Partial<IZRomulatorConfigGames>) {\n this._config = { ...this._config, ...other };\n return this;\n }\n\n public build(): IZRomulatorConfigGames {\n return structuredClone(this._config);\n }\n}\n","import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigMediaMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigMediaMetadata.mediaFolder()];\n }\n\n public static mediaFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"media-folder\")\n .path(\"mediaFolder\")\n .name(\"Media Folder\")\n .fallback(\"${HOME}/Games/.media\")\n .editable()\n .file()\n .build();\n }\n}\n","import { firstDefined } from \"@zthun/helpful-fn\";\nimport type { IZMetadata } from \"@zthun/helpful-query\";\nimport { castArray } from \"lodash-es\";\n\n/**\n * Represents a list of known config ids\n */\nexport enum ZRomulatorConfigId {\n /**\n * Config for games.\n */\n Games = \"games\",\n\n /**\n * Config id for media.\n */\n Media = \"media\",\n}\n\nexport interface IZRomulatorConfig<T = any> {\n id: ZRomulatorConfigId;\n name: string;\n\n avatar?: string;\n contents?: T;\n description?: string;\n file: string;\n metadata?: IZMetadata[];\n}\n\nexport class ZRomulatorConfigBuilder<T = any> {\n private _config: IZRomulatorConfig<T> = {\n id: ZRomulatorConfigId.Games,\n name: \"\",\n file: \"\",\n };\n\n public id(id: ZRomulatorConfigId) {\n this._config.id = id;\n return this;\n }\n\n public avatar(id: string) {\n this._config.avatar = id;\n return this;\n }\n\n public name(name: string) {\n this._config.name = name;\n return this;\n }\n\n public description(description: string) {\n this._config.description = description;\n return this;\n }\n\n public file(path: string) {\n this._config.file = path;\n return this;\n }\n\n public contents(contents?: T) {\n this._config.contents = contents;\n return this;\n }\n\n public metadata(meta: IZMetadata | IZMetadata[]) {\n const metadata = firstDefined([], this._config.metadata);\n this._config.metadata = metadata.concat(castArray(meta));\n return this;\n }\n\n public copy(other: IZRomulatorConfig<T>) {\n this._config = structuredClone(other);\n return this;\n }\n\n public build() {\n return structuredClone(this._config);\n }\n}\n","/**\n * Describes a type of system.\n */\nexport enum ZRomulatorSystemType {\n /**\n * A console system.\n */\n Console = \"console\",\n /**\n * A handheld system\n */\n Handheld = \"handheld\",\n /**\n * A cabinet system\n */\n Arcade = \"arcade\",\n /**\n * Known computer systems\n */\n Computer = \"computer\",\n}\n","import { uniq } from \"lodash-es\";\nimport { ZRomulatorSystemType } from \"./system-type.mjs\";\n\n/**\n * Represents a system in romulator.\n *\n * These are detected by the file system.\n * See ES-DE for the standard directory\n * structure.\n */\nexport interface IZRomulatorSystem {\n /**\n * Unique identifier for the system.\n *\n * If you think about the directory structure\n * for ES-DE, for example, the id would map to\n * the name of the system directory.\n *\n * This is essentially a slug.\n */\n id: string;\n /**\n * The canonical name of the system.\n *\n * This is the most globally recognized name,\n * not the historical accurate name for each\n * and every region.\n */\n name: string;\n /**\n * Other names that the system is known by.\n *\n * This helps with searching and scraping\n * media for systems that have multiple names\n * around the world.\n *\n * For example, the Nintendo Entertainment System\n * is known as the Famicom in Japan.\n */\n aliases: string[];\n /**\n * The generational index of the system.\n */\n generation: number;\n /**\n * The system manufacturers.\n *\n * There can be multiple manufacturers for a system.\n */\n manufacturers: string[];\n /**\n * The type of system.\n */\n type: ZRomulatorSystemType;\n}\n\n/**\n * A builder for creating an IZRomulatorSystem.\n */\nexport class ZRomulatorSystemBuilder {\n private _system: IZRomulatorSystem = {\n id: \"\",\n name: \"\",\n aliases: [],\n generation: 0,\n manufacturers: [],\n type: ZRomulatorSystemType.Console,\n };\n\n /**\n * Sets the id (slug) of the system.\n *\n * @param id -\n * The unique identifier for the system.\n * @returns\n * This instance.\n */\n public id(id: string): this {\n this._system.id = id;\n return this;\n }\n\n /**\n * Sets the canonical name of the system.\n *\n * @param name -\n * The canonical name of the system.\n * @returns\n * This instance.\n */\n public name(name: string): this {\n this._system.name = name;\n return this;\n }\n\n /**\n * Sets the system type.\n *\n * @param type -\n * The type of system.\n * @returns\n * This instance.\n */\n public type(type: ZRomulatorSystemType): this {\n this._system.type = type;\n return this;\n }\n\n /**\n * Sets the system type to console.\n *\n * @returns\n * This instance.\n */\n public console = this.type.bind(this, ZRomulatorSystemType.Console);\n\n /**\n * Sets the system type to handheld.\n *\n * @returns\n * This instance.\n */\n public handheld = this.type.bind(this, ZRomulatorSystemType.Handheld);\n\n /**\n * Sets the system type to arcade.\n *\n * @returns\n * This instance.\n */\n public arcade = this.type.bind(this, ZRomulatorSystemType.Arcade);\n\n /**\n * Sets the system type to computer.\n *\n * @returns\n * This instance.\n */\n public computer = this.type.bind(this, ZRomulatorSystemType.Computer);\n\n /**\n * Sets the aliases of the system.\n *\n * @param aliases -\n * The aliases of the system.\n * @returns\n * This instance.\n */\n public aliases(aliases: string[]): this {\n this._system.aliases = aliases;\n return this;\n }\n\n /**\n * Adds an alias to the system.\n *\n * If an alias already exists, then it will\n * not be added again.\n *\n * @param alias -\n * The alias to add to the system.\n * @returns\n * This instance.\n */\n public alias(alias: string): this {\n const aliases = this._system.aliases.slice();\n aliases.push(alias);\n return this.aliases(uniq(aliases));\n }\n\n /**\n * Sets the generational index of the system.\n *\n * @param generation -\n * The generational index of the system.\n * @returns\n * This instance.\n */\n public generation(generation: number): this {\n this._system.generation = generation;\n return this;\n }\n\n /**\n * Sets the manufacturers of the system.\n *\n * @param manufacturers -\n * The manufacturers of the system.\n * @returns\n * This instance.\n */\n public manufacturers(manufacturers: string[]): this {\n this._system.manufacturers = manufacturers;\n return this;\n }\n\n /**\n * Adds a manufacturer for the system.\n *\n * If a manufacturer already exists, then it will not be added again.\n *\n * @param manufacturer -\n * The manufacturer of the system.\n * @returns\n * This instance.\n */\n public manufacturer(manufacturer: string): this {\n const manufacturers = this._system.manufacturers.slice();\n manufacturers.push(manufacturer);\n return this.manufacturers(uniq(manufacturers));\n }\n\n /**\n * Builds the system instance.\n *\n * @returns\n * A structured clone of the current system\n * that has been built.\n */\n public build() {\n return structuredClone(this._system);\n }\n}\n"],"names":["ZRomulatorConfigGamesMetadata","all","gamesFolder","ZMetadataBuilder","id","path","name","fallback","editable","file","build","ZRomulatorConfigGamesBuilder","_define_property","_config","games","copy","other","structuredClone","assign","ZRomulatorConfigMediaMetadata","mediaFolder","ZRomulatorConfigId","ZRomulatorConfigBuilder","avatar","description","contents","metadata","meta","firstDefined","concat","castArray","ZRomulatorSystemType","ZRomulatorSystemBuilder","_system","aliases","generation","manufacturers","type","Console","console","bind","handheld","Handheld","arcade","Arcade","computer","Computer","alias","slice","push","uniq","manufacturer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAA,6BAAA,iBAAA,WAAA;AAAeA,IAAAA,SAAAA,6BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,6BAAAA,CAAAA;;AAAAA,IAAAA,eAAAA,CAAAA,6BAAAA,EAAAA,IAAAA,EAAAA;;YACNC,GAAAA,EAAAA,KAAAA;mBAAd,SAAcA,GAAAA,GAAAA;gBACZ,OAAO;AAFWD,oBAAAA,6BAAAA,CAEoBE,WAAW;AAAG,iBAAA;AACtD;;;YAEcA,GAAAA,EAAAA,aAAAA;mBAAd,SAAcA,WAAAA,GAAAA;AACZ,gBAAA,OAAO,IAAIC,6BACRC,EAAAA,CAAAA,EAAE,CAAC,cACHC,CAAAA,CAAAA,IAAI,CAAC,aACLC,CAAAA,CAAAA,IAAI,CAAC,cAAA,CAAA,CACLC,QAAQ,CAAC,eAAA,CAAA,CACTC,QAAQ,EACRC,CAAAA,IAAI,GACJC,KAAK,EAAA;AACV;;;AAdoBV,IAAAA,OAAAA,6BAAAA;AAerB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbM,IAAA,4BAAA,iBAAA,WAAA;AAAMW,IAAAA,SAAAA,4BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,4BAAAA,CAAAA;AACX,QAAAC,kBAAA,CAAA,IAAA,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E,UAAU,GAAGA,UAAAA;AAC1B,gBAAA,OAAO,IAAI;AACb;;;YAUOC,GAAAA,EAAAA,eAAAA;;;;;;;;MAAP,SAAOA,cAAcA,aAAuB,EAAA;AAC1C,gBAAA,IAAI,CAACH,OAAO,CAACG,aAAa,GAAGA,aAAAA;AAC7B,gBAAA,OAAO,IAAI;AACb;;;YAYOe,GAAAA,EAAAA,cAAAA;;;;;;;;;;MAAP,SAAOA,aAAaA,YAAoB,EAAA;AACtC,gBAAA,IAAMf,gBAAgB,IAAI,CAACH,OAAO,CAACG,aAAa,CAACY,KAAK,EAAA;AACtDZ,gBAAAA,aAAAA,CAAca,IAAI,CAACE,YAAAA,CAAAA;AACnB,gBAAA,OAAO,IAAI,CAACf,aAAa,CAACc,aAAKd,CAAAA,aAAAA,CAAAA,CAAAA;AACjC;;;YASO1B,GAAAA,EAAAA,OAAAA;;;;;;;AADN,MACD,SAAOA,KAAAA,GAAAA;gBACL,OAAOO,eAAAA,CAAgB,IAAI,CAACgB,OAAO,CAAA;AACrC;;;AAlKWD,IAAAA,OAAAA,uBAAAA;AAmKZ,CAAA;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var ZRomulatorConfigGamesMetadata = /*#__PURE__*/ function() {
36
36
  {
37
37
  key: "gamesFolder",
38
38
  value: function gamesFolder() {
39
- return new ZMetadataBuilder().id("games-folder").path("gamesFolder").name("Games Folder").editable().file().build();
39
+ return new ZMetadataBuilder().id("games-folder").path("gamesFolder").name("Games Folder").fallback("${HOME}/Games").editable().file().build();
40
40
  }
41
41
  }
42
42
  ]);
@@ -160,7 +160,7 @@ var ZRomulatorConfigMediaMetadata = /*#__PURE__*/ function() {
160
160
  {
161
161
  key: "mediaFolder",
162
162
  value: function mediaFolder() {
163
- return new ZMetadataBuilder().id("media-folder").path("mediaFolder").name("Media Folder").editable().file().build();
163
+ return new ZMetadataBuilder().id("media-folder").path("mediaFolder").name("Media Folder").fallback("${HOME}/Games/.media").editable().file().build();
164
164
  }
165
165
  }
166
166
  ]);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/config/config-games-metadata.mts","../src/config/config-games.mts","../src/config/config-media-metadata.mts","../src/config/config.mts","../src/system/system-type.mts","../src/system/system.mts"],"sourcesContent":["import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigGamesMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigGamesMetadata.gamesFolder()];\n }\n\n public static gamesFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"games-folder\")\n .path(\"gamesFolder\")\n .name(\"Games Folder\")\n .editable()\n .file()\n .build();\n }\n}\n","export interface IZRomulatorConfigGames {\n gamesFolder?: string;\n}\n\nexport class ZRomulatorConfigGamesBuilder {\n private _config: IZRomulatorConfigGames = {};\n\n public gamesFolder(games: string): this {\n this._config.gamesFolder = games;\n return this;\n }\n\n public copy(other: IZRomulatorConfigGames) {\n this._config = structuredClone(other);\n return this;\n }\n\n public assign(other: Partial<IZRomulatorConfigGames>) {\n this._config = { ...this._config, ...other };\n return this;\n }\n\n public build(): IZRomulatorConfigGames {\n return structuredClone(this._config);\n }\n}\n","import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigMediaMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigMediaMetadata.mediaFolder()];\n }\n\n public static mediaFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"media-folder\")\n .path(\"mediaFolder\")\n .name(\"Media Folder\")\n .editable()\n .file()\n .build();\n }\n}\n","import { firstDefined } from \"@zthun/helpful-fn\";\nimport type { IZMetadata } from \"@zthun/helpful-query\";\nimport { castArray } from \"lodash-es\";\n\n/**\n * Represents a list of known config ids\n */\nexport enum ZRomulatorConfigId {\n /**\n * Config for games.\n */\n Games = \"games\",\n\n /**\n * Config id for media.\n */\n Media = \"media\",\n}\n\nexport interface IZRomulatorConfig<T = any> {\n id: ZRomulatorConfigId;\n name: string;\n\n avatar?: string;\n contents?: T;\n description?: string;\n file: string;\n metadata?: IZMetadata[];\n}\n\nexport class ZRomulatorConfigBuilder<T = any> {\n private _config: IZRomulatorConfig<T> = {\n id: ZRomulatorConfigId.Games,\n name: \"\",\n file: \"\",\n };\n\n public id(id: ZRomulatorConfigId) {\n this._config.id = id;\n return this;\n }\n\n public avatar(id: string) {\n this._config.avatar = id;\n return this;\n }\n\n public name(name: string) {\n this._config.name = name;\n return this;\n }\n\n public description(description: string) {\n this._config.description = description;\n return this;\n }\n\n public file(path: string) {\n this._config.file = path;\n return this;\n }\n\n public contents(contents?: T) {\n this._config.contents = contents;\n return this;\n }\n\n public metadata(meta: IZMetadata | IZMetadata[]) {\n const metadata = firstDefined([], this._config.metadata);\n this._config.metadata = metadata.concat(castArray(meta));\n return this;\n }\n\n public copy(other: IZRomulatorConfig<T>) {\n this._config = structuredClone(other);\n return this;\n }\n\n public build() {\n return structuredClone(this._config);\n }\n}\n","/**\n * Describes a type of system.\n */\nexport enum ZRomulatorSystemType {\n /**\n * A console system.\n */\n Console = \"console\",\n /**\n * A handheld system\n */\n Handheld = \"handheld\",\n /**\n * A cabinet system\n */\n Arcade = \"arcade\",\n /**\n * Known computer systems\n */\n Computer = \"computer\",\n}\n","import { uniq } from \"lodash-es\";\nimport { ZRomulatorSystemType } from \"./system-type.mjs\";\n\n/**\n * Represents a system in romulator.\n *\n * These are detected by the file system.\n * See ES-DE for the standard directory\n * structure.\n */\nexport interface IZRomulatorSystem {\n /**\n * Unique identifier for the system.\n *\n * If you think about the directory structure\n * for ES-DE, for example, the id would map to\n * the name of the system directory.\n *\n * This is essentially a slug.\n */\n id: string;\n /**\n * The canonical name of the system.\n *\n * This is the most globally recognized name,\n * not the historical accurate name for each\n * and every region.\n */\n name: string;\n /**\n * Other names that the system is known by.\n *\n * This helps with searching and scraping\n * media for systems that have multiple names\n * around the world.\n *\n * For example, the Nintendo Entertainment System\n * is known as the Famicom in Japan.\n */\n aliases: string[];\n /**\n * The generational index of the system.\n */\n generation: number;\n /**\n * The system manufacturers.\n *\n * There can be multiple manufacturers for a system.\n */\n manufacturers: string[];\n /**\n * The type of system.\n */\n type: ZRomulatorSystemType;\n}\n\n/**\n * A builder for creating an IZRomulatorSystem.\n */\nexport class ZRomulatorSystemBuilder {\n private _system: IZRomulatorSystem = {\n id: \"\",\n name: \"\",\n aliases: [],\n generation: 0,\n manufacturers: [],\n type: ZRomulatorSystemType.Console,\n };\n\n /**\n * Sets the id (slug) of the system.\n *\n * @param id -\n * The unique identifier for the system.\n * @returns\n * This instance.\n */\n public id(id: string): this {\n this._system.id = id;\n return this;\n }\n\n /**\n * Sets the canonical name of the system.\n *\n * @param name -\n * The canonical name of the system.\n * @returns\n * This instance.\n */\n public name(name: string): this {\n this._system.name = name;\n return this;\n }\n\n /**\n * Sets the system type.\n *\n * @param type -\n * The type of system.\n * @returns\n * This instance.\n */\n public type(type: ZRomulatorSystemType): this {\n this._system.type = type;\n return this;\n }\n\n /**\n * Sets the system type to console.\n *\n * @returns\n * This instance.\n */\n public console = this.type.bind(this, ZRomulatorSystemType.Console);\n\n /**\n * Sets the system type to handheld.\n *\n * @returns\n * This instance.\n */\n public handheld = this.type.bind(this, ZRomulatorSystemType.Handheld);\n\n /**\n * Sets the system type to arcade.\n *\n * @returns\n * This instance.\n */\n public arcade = this.type.bind(this, ZRomulatorSystemType.Arcade);\n\n /**\n * Sets the system type to computer.\n *\n * @returns\n * This instance.\n */\n public computer = this.type.bind(this, ZRomulatorSystemType.Computer);\n\n /**\n * Sets the aliases of the system.\n *\n * @param aliases -\n * The aliases of the system.\n * @returns\n * This instance.\n */\n public aliases(aliases: string[]): this {\n this._system.aliases = aliases;\n return this;\n }\n\n /**\n * Adds an alias to the system.\n *\n * If an alias already exists, then it will\n * not be added again.\n *\n * @param alias -\n * The alias to add to the system.\n * @returns\n * This instance.\n */\n public alias(alias: string): this {\n const aliases = this._system.aliases.slice();\n aliases.push(alias);\n return this.aliases(uniq(aliases));\n }\n\n /**\n * Sets the generational index of the system.\n *\n * @param generation -\n * The generational index of the system.\n * @returns\n * This instance.\n */\n public generation(generation: number): this {\n this._system.generation = generation;\n return this;\n }\n\n /**\n * Sets the manufacturers of the system.\n *\n * @param manufacturers -\n * The manufacturers of the system.\n * @returns\n * This instance.\n */\n public manufacturers(manufacturers: string[]): this {\n this._system.manufacturers = manufacturers;\n return this;\n }\n\n /**\n * Adds a manufacturer for the system.\n *\n * If a manufacturer already exists, then it will not be added again.\n *\n * @param manufacturer -\n * The manufacturer of the system.\n * @returns\n * This instance.\n */\n public manufacturer(manufacturer: string): this {\n const manufacturers = this._system.manufacturers.slice();\n manufacturers.push(manufacturer);\n return this.manufacturers(uniq(manufacturers));\n }\n\n /**\n * Builds the system instance.\n *\n * @returns\n * A structured clone of the current system\n * that has been built.\n */\n public build() {\n return structuredClone(this._system);\n }\n}\n"],"names":["ZRomulatorConfigGamesMetadata","all","gamesFolder","ZMetadataBuilder","id","path","name","editable","file","build","ZRomulatorConfigGamesBuilder","_define_property","_config","games","copy","other","structuredClone","assign","ZRomulatorConfigMediaMetadata","mediaFolder","ZRomulatorConfigId","ZRomulatorConfigBuilder","avatar","description","contents","metadata","meta","firstDefined","concat","castArray","ZRomulatorSystemType","ZRomulatorSystemBuilder","_system","aliases","generation","manufacturers","type","Console","console","bind","handheld","Handheld","arcade","Arcade","computer","Computer","alias","slice","push","uniq","manufacturer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEO,IAAA,6BAAA,iBAAA,WAAA;AAAeA,IAAAA,SAAAA,6BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,6BAAAA,CAAAA;;AAAAA,IAAAA,eAAAA,CAAAA,6BAAAA,EAAAA,IAAAA,EAAAA;;YACNC,GAAAA,EAAAA,KAAAA;mBAAd,SAAcA,GAAAA,GAAAA;gBACZ,OAAO;AAFWD,oBAAAA,6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-metadata.mts","../src/config/config-games.mts","../src/config/config-media-metadata.mts","../src/config/config.mts","../src/system/system-type.mts","../src/system/system.mts"],"sourcesContent":["import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigGamesMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigGamesMetadata.gamesFolder()];\n }\n\n public static gamesFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"games-folder\")\n .path(\"gamesFolder\")\n .name(\"Games Folder\")\n .fallback(\"${HOME}/Games\")\n .editable()\n .file()\n .build();\n }\n}\n","export interface IZRomulatorConfigGames {\n gamesFolder?: string;\n}\n\nexport class ZRomulatorConfigGamesBuilder {\n private _config: IZRomulatorConfigGames = {};\n\n public gamesFolder(games: string): this {\n this._config.gamesFolder = games;\n return this;\n }\n\n public copy(other: IZRomulatorConfigGames) {\n this._config = structuredClone(other);\n return this;\n }\n\n public assign(other: Partial<IZRomulatorConfigGames>) {\n this._config = { ...this._config, ...other };\n return this;\n }\n\n public build(): IZRomulatorConfigGames {\n return structuredClone(this._config);\n }\n}\n","import { ZMetadataBuilder, type IZMetadata } from \"@zthun/helpful-query\";\n\nexport abstract class ZRomulatorConfigMediaMetadata {\n public static all(): IZMetadata[] {\n return [ZRomulatorConfigMediaMetadata.mediaFolder()];\n }\n\n public static mediaFolder(): IZMetadata {\n return new ZMetadataBuilder()\n .id(\"media-folder\")\n .path(\"mediaFolder\")\n .name(\"Media Folder\")\n .fallback(\"${HOME}/Games/.media\")\n .editable()\n .file()\n .build();\n }\n}\n","import { firstDefined } from \"@zthun/helpful-fn\";\nimport type { IZMetadata } from \"@zthun/helpful-query\";\nimport { castArray } from \"lodash-es\";\n\n/**\n * Represents a list of known config ids\n */\nexport enum ZRomulatorConfigId {\n /**\n * Config for games.\n */\n Games = \"games\",\n\n /**\n * Config id for media.\n */\n Media = \"media\",\n}\n\nexport interface IZRomulatorConfig<T = any> {\n id: ZRomulatorConfigId;\n name: string;\n\n avatar?: string;\n contents?: T;\n description?: string;\n file: string;\n metadata?: IZMetadata[];\n}\n\nexport class ZRomulatorConfigBuilder<T = any> {\n private _config: IZRomulatorConfig<T> = {\n id: ZRomulatorConfigId.Games,\n name: \"\",\n file: \"\",\n };\n\n public id(id: ZRomulatorConfigId) {\n this._config.id = id;\n return this;\n }\n\n public avatar(id: string) {\n this._config.avatar = id;\n return this;\n }\n\n public name(name: string) {\n this._config.name = name;\n return this;\n }\n\n public description(description: string) {\n this._config.description = description;\n return this;\n }\n\n public file(path: string) {\n this._config.file = path;\n return this;\n }\n\n public contents(contents?: T) {\n this._config.contents = contents;\n return this;\n }\n\n public metadata(meta: IZMetadata | IZMetadata[]) {\n const metadata = firstDefined([], this._config.metadata);\n this._config.metadata = metadata.concat(castArray(meta));\n return this;\n }\n\n public copy(other: IZRomulatorConfig<T>) {\n this._config = structuredClone(other);\n return this;\n }\n\n public build() {\n return structuredClone(this._config);\n }\n}\n","/**\n * Describes a type of system.\n */\nexport enum ZRomulatorSystemType {\n /**\n * A console system.\n */\n Console = \"console\",\n /**\n * A handheld system\n */\n Handheld = \"handheld\",\n /**\n * A cabinet system\n */\n Arcade = \"arcade\",\n /**\n * Known computer systems\n */\n Computer = \"computer\",\n}\n","import { uniq } from \"lodash-es\";\nimport { ZRomulatorSystemType } from \"./system-type.mjs\";\n\n/**\n * Represents a system in romulator.\n *\n * These are detected by the file system.\n * See ES-DE for the standard directory\n * structure.\n */\nexport interface IZRomulatorSystem {\n /**\n * Unique identifier for the system.\n *\n * If you think about the directory structure\n * for ES-DE, for example, the id would map to\n * the name of the system directory.\n *\n * This is essentially a slug.\n */\n id: string;\n /**\n * The canonical name of the system.\n *\n * This is the most globally recognized name,\n * not the historical accurate name for each\n * and every region.\n */\n name: string;\n /**\n * Other names that the system is known by.\n *\n * This helps with searching and scraping\n * media for systems that have multiple names\n * around the world.\n *\n * For example, the Nintendo Entertainment System\n * is known as the Famicom in Japan.\n */\n aliases: string[];\n /**\n * The generational index of the system.\n */\n generation: number;\n /**\n * The system manufacturers.\n *\n * There can be multiple manufacturers for a system.\n */\n manufacturers: string[];\n /**\n * The type of system.\n */\n type: ZRomulatorSystemType;\n}\n\n/**\n * A builder for creating an IZRomulatorSystem.\n */\nexport class ZRomulatorSystemBuilder {\n private _system: IZRomulatorSystem = {\n id: \"\",\n name: \"\",\n aliases: [],\n generation: 0,\n manufacturers: [],\n type: ZRomulatorSystemType.Console,\n };\n\n /**\n * Sets the id (slug) of the system.\n *\n * @param id -\n * The unique identifier for the system.\n * @returns\n * This instance.\n */\n public id(id: string): this {\n this._system.id = id;\n return this;\n }\n\n /**\n * Sets the canonical name of the system.\n *\n * @param name -\n * The canonical name of the system.\n * @returns\n * This instance.\n */\n public name(name: string): this {\n this._system.name = name;\n return this;\n }\n\n /**\n * Sets the system type.\n *\n * @param type -\n * The type of system.\n * @returns\n * This instance.\n */\n public type(type: ZRomulatorSystemType): this {\n this._system.type = type;\n return this;\n }\n\n /**\n * Sets the system type to console.\n *\n * @returns\n * This instance.\n */\n public console = this.type.bind(this, ZRomulatorSystemType.Console);\n\n /**\n * Sets the system type to handheld.\n *\n * @returns\n * This instance.\n */\n public handheld = this.type.bind(this, ZRomulatorSystemType.Handheld);\n\n /**\n * Sets the system type to arcade.\n *\n * @returns\n * This instance.\n */\n public arcade = this.type.bind(this, ZRomulatorSystemType.Arcade);\n\n /**\n * Sets the system type to computer.\n *\n * @returns\n * This instance.\n */\n public computer = this.type.bind(this, ZRomulatorSystemType.Computer);\n\n /**\n * Sets the aliases of the system.\n *\n * @param aliases -\n * The aliases of the system.\n * @returns\n * This instance.\n */\n public aliases(aliases: string[]): this {\n this._system.aliases = aliases;\n return this;\n }\n\n /**\n * Adds an alias to the system.\n *\n * If an alias already exists, then it will\n * not be added again.\n *\n * @param alias -\n * The alias to add to the system.\n * @returns\n * This instance.\n */\n public alias(alias: string): this {\n const aliases = this._system.aliases.slice();\n aliases.push(alias);\n return this.aliases(uniq(aliases));\n }\n\n /**\n * Sets the generational index of the system.\n *\n * @param generation -\n * The generational index of the system.\n * @returns\n * This instance.\n */\n public generation(generation: number): this {\n this._system.generation = generation;\n return this;\n }\n\n /**\n * Sets the manufacturers of the system.\n *\n * @param manufacturers -\n * The manufacturers of the system.\n * @returns\n * This instance.\n */\n public manufacturers(manufacturers: string[]): this {\n this._system.manufacturers = manufacturers;\n return this;\n }\n\n /**\n * Adds a manufacturer for the system.\n *\n * If a manufacturer already exists, then it will not be added again.\n *\n * @param manufacturer -\n * The manufacturer of the system.\n * @returns\n * This instance.\n */\n public manufacturer(manufacturer: string): this {\n const manufacturers = this._system.manufacturers.slice();\n manufacturers.push(manufacturer);\n return this.manufacturers(uniq(manufacturers));\n }\n\n /**\n * Builds the system instance.\n *\n * @returns\n * A structured clone of the current system\n * that has been built.\n */\n public build() {\n return structuredClone(this._system);\n }\n}\n"],"names":["ZRomulatorConfigGamesMetadata","all","gamesFolder","ZMetadataBuilder","id","path","name","fallback","editable","file","build","ZRomulatorConfigGamesBuilder","_define_property","_config","games","copy","other","structuredClone","assign","ZRomulatorConfigMediaMetadata","mediaFolder","ZRomulatorConfigId","ZRomulatorConfigBuilder","avatar","description","contents","metadata","meta","firstDefined","concat","castArray","ZRomulatorSystemType","ZRomulatorSystemBuilder","_system","aliases","generation","manufacturers","type","Console","console","bind","handheld","Handheld","arcade","Arcade","computer","Computer","alias","slice","push","uniq","manufacturer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEO,IAAA,6BAAA,iBAAA,WAAA;AAAeA,IAAAA,SAAAA,6BAAAA,GAAAA;AAAAA,QAAAA,mBAAAA,CAAAA,IAAAA,EAAAA,6BAAAA,CAAAA;;AAAAA,IAAAA,eAAAA,CAAAA,6BAAAA,EAAAA,IAAAA,EAAAA;;YACNC,GAAAA,EAAAA,KAAAA;mBAAd,SAAcA,GAAAA,GAAAA;gBACZ,OAAO;AAFWD,oBAAAA,6BAAAA,CAEoBE,WAAW;AAAG,iBAAA;AACtD;;;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;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zthun/romulator-client",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "A client for declaring models and invoking the romulator api",
5
5
  "author": "Anthony Bonta",
6
6
  "license": "MIT",
@@ -25,8 +25,8 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@zthun/helpful-fn": "^9.3.0",
29
- "@zthun/helpful-query": "^9.3.0",
28
+ "@zthun/helpful-fn": "^9.4.0",
29
+ "@zthun/helpful-query": "^9.4.0",
30
30
  "lodash-es": "^4.17.21"
31
31
  },
32
32
  "devDependencies": {
@@ -41,5 +41,5 @@
41
41
  "dist"
42
42
  ],
43
43
  "sideEffects": false,
44
- "gitHead": "52bd432dd2df0980d450b20de58d7f58c6d0da94"
44
+ "gitHead": "8e51e1660617d8aea4be5cd3c2d666e2bf673f52"
45
45
  }