Skip to content

Commit

Permalink
remove install of asset-pack
Browse files Browse the repository at this point in the history
  • Loading branch information
gonpombo8 committed Sep 5, 2024
1 parent bc3c487 commit c2a058d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 84 deletions.
45 changes: 0 additions & 45 deletions packages/@dcl/playground-assets/etc/playground-assets.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ export const componentDefinitionByName: {
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
Expand Down Expand Up @@ -1385,9 +1384,6 @@ export const enum InputAction {
IA_WALK = 9
}

// @public (undocumented)
export const InputModifier: LastWriteWinElementSetComponentDefinition<PBInputModifier>;

// @public
export const inputSystem: IInputSystem;

Expand Down Expand Up @@ -2307,47 +2303,6 @@ export namespace PBGltfContainerLoadingState {
export function encode(message: PBGltfContainerLoadingState, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBInputModifier {
// (undocumented)
mode?: {
$case: "standard";
standard: PBInputModifier_StandardInput;
} | undefined;
}

// @public (undocumented)
export namespace PBInputModifier {
// (undocumented)
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier;
// (undocumented)
export function encode(message: PBInputModifier, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBInputModifier_StandardInput {
// (undocumented)
disableAll?: boolean | undefined;
// (undocumented)
disableEmote?: boolean | undefined;
// (undocumented)
disableJog?: boolean | undefined;
// (undocumented)
disableJump?: boolean | undefined;
// (undocumented)
disableRun?: boolean | undefined;
// (undocumented)
disableWalk?: boolean | undefined;
}

// @public (undocumented)
export namespace PBInputModifier_StandardInput {
// (undocumented)
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBInputModifier_StandardInput;
// (undocumented)
export function encode(message: PBInputModifier_StandardInput, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBMaterial {
// (undocumented)
Expand Down
4 changes: 2 additions & 2 deletions packages/@dcl/sdk-commands/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions packages/@dcl/sdk-commands/src/commands/build/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import path from 'path'
import { CliComponents } from '../../components'
import { declareArgs } from '../../logic/args'
import {
installAssetPack,
installDependencies,
isEditorScene,
needsDependencies,
SceneProject,
WearableProject
} from '../../logic/project-validations'
import { installDependencies, needsDependencies, SceneProject, WearableProject } from '../../logic/project-validations'
import { getBaseCoords } from '../../logic/scene-validations'
import { b64HashingFunction } from '../../logic/project-files'
import { bundleProject } from '../../logic/bundle'
Expand Down Expand Up @@ -70,10 +63,6 @@ export async function buildScene(options: Options, project: SceneProject | Weara
if (await needsDependencies(options.components, project.workingDirectory)) {
await installDependencies(options.components, project.workingDirectory)
}

if (await isEditorScene(options.components, project.workingDirectory)) {
await installAssetPack(options.components, project.workingDirectory)
}
}

const watch = !!options.args['--watch']
Expand Down
27 changes: 2 additions & 25 deletions packages/@dcl/sdk-commands/src/logic/project-validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Scene } from '@dcl/schemas'
import path from 'path'
import { CliComponents } from '../components'
import { colors } from '../components/log'
import { printProgressInfo, printSuccess, printWarning } from './beautiful-logs'
import { printProgressInfo } from './beautiful-logs'
import { CliError } from './error'
import { getSceneFilePath, getValidSceneJson } from './scene-validations'
import { getInstalledPackageVersion, getInstalledPackageVersionInsidePackage } from './config'
import { getInstalledPackageVersion } from './config'
import { getSmartWearableFile, getValidWearableJson } from './portable-experience-sw-validations'
import { getPackageJson } from './project-files'

Expand Down Expand Up @@ -74,29 +74,6 @@ export async function installDependencies(
printProgressInfo(components.logger, colors.white('✅ Installing dependencies...'))
}

/*
* Runs "npm install" for desired project
*/
export async function installAssetPack(
components: Pick<CliComponents, 'logger' | 'spawner' | 'fs'>,
workingDirectory: string
): Promise<void> {
const assetPack = '@dcl/asset-packs' as const
let assetPackVersion: string = ''
try {
assetPackVersion = await getInstalledPackageVersionInsidePackage(
components,
assetPack,
'@dcl/inspector',
workingDirectory
)
await components.spawner.exec(workingDirectory, npmBin, ['install', `${assetPack}@${assetPackVersion}`, '-D'])
printSuccess(components.logger, `${assetPack}@${assetPackVersion} installed`, '')
} catch (e: any) {
printWarning(components.logger, `Failed to install ${assetPack}@${assetPackVersion}' \n ${e.message}`)
}
}

/**
* Run NPM commands
*/
Expand Down

0 comments on commit c2a058d

Please sign in to comment.