Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.5.2 #679

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Piral Changelog

## 1.5.2 (tbd)

- Fixed created website emulator paths when running in Windows
- Fixed website emulator running for `pilet debug` in Windows
- Added tea constitution file to repo

## 1.5.1 (March 11, 2024)

- Fixed Node.js engine constraint in `piral-cli` to "16.0.0"
Expand Down
8 changes: 4 additions & 4 deletions src/tooling/piral-cli/src/common/website.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent } from 'https';
import { join, relative, resolve } from 'path';
import { posix, relative, resolve } from 'path';
import { createPiralStubIndexIfNotExists } from './template';
import { getAuthorizationHeaders, getAxiosOptions, getCertificate, handleAxiosError } from './http';
import { packageJson } from './constants';
Expand Down Expand Up @@ -76,9 +76,9 @@ async function createEmulatorFiles(
generated: true,
},
files: emulatorJson.files.assets,
main: join(appDirName, mainFile),
typings: join(appDirName, emulatorJson.files.typings),
app: join(appDirName, emulatorJson.files.app),
main: posix.join(appDirName, mainFile),
typings: posix.join(appDirName, emulatorJson.files.typings),
app: posix.join(appDirName, emulatorJson.files.app),
peerDependencies: {},
optionalDependencies: emulatorJson.dependencies.optional,
devDependencies: emulatorJson.dependencies.included,
Expand Down
5 changes: 3 additions & 2 deletions src/tooling/piral-cli/src/injectors/pilet-injector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { URL } from 'url';
import { join, resolve } from 'path';
import { join, resolve, basename } from 'path';
import { EventEmitter } from 'events';
import { existsSync } from 'fs';
import { readFile, stat, writeFile } from 'fs/promises';
Expand Down Expand Up @@ -141,7 +141,8 @@ export default class PiletInjector implements KrasInjector {
this.indexPath = `${publicUrl}index.html`;
const cbs = {};

if (app.endsWith('/app')) {
// If we end with "/app" or "\app" we might have a proper emulator
if (basename(app) === 'app') {
const path = resolve(app, '..', 'package.json');

if (existsSync(path)) {
Expand Down
6 changes: 6 additions & 0 deletions tea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://tea.xyz/what-is-this-file
---
version: 1.0.0
codeOwners:
- '0x8aC35357bc208c3f440C90944c2F7a37429fA480'
quorum: 1